LibVNCClient: fix possible infinite loop

Closes #251
pull/3/head
Christian Beier 6 years ago
parent 2f5b2ad1c6
commit c3115350eb
No known key found for this signature in database
GPG Key ID: 421BB3B45C6067F8

@ -1879,7 +1879,7 @@ HandleRFBServerMessage(rfbClient* client)
/* Regardless of cause, do not divide by zero. */
linesToRead = bytesPerLine ? (RFB_BUFFER_SIZE / bytesPerLine) : 0;
while (h > 0) {
while (linesToRead && h > 0) {
if (linesToRead > h)
linesToRead = h;

Loading…
Cancel
Save