Skip to content

Commit 1e45e76

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

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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+
raise 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)