Skip to content

Commit f0ffe75

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

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pyrdp/parser/rdp/virtual_channel/clipboard.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ def parseFormatList(self, payload, msgFlags):
105105

106106
while lastChar != b"\x00\x00":
107107
lastChar = stream.read(2)
108+
if len(lastChar) < 2:
109+
raise ValueError("Format name is not null-terminated")
108110
formatName += lastChar
109111

110112
self.formats[formatId] = LongFormatName(formatId, formatName)

0 commit comments

Comments
 (0)