Skip to content

Commit cabcabf

Browse files
authored
Removed infinite loop in parser.rdp.virtual_channel.dynamic_channel.
1 parent 1daf83e commit cabcabf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pyrdp/parser/rdp/virtual_channel/dynamic_channel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def doParse(self, data: bytes) -> PDU:
3333
channelName = ""
3434
char = stream.read(1).decode()
3535
while char != "\x00":
36+
if len(char) == 0:
37+
return ValueError("Channel name is not null-terminated")
3638
channelName += char
3739
char = stream.read(1).decode()
3840
return CreateRequestPDU(cbid, sp, channelId, channelName)

0 commit comments

Comments
 (0)