--- file_not_specified_in_diff +++ file_not_specified_in_diff @@ -, +, @@ CWE-835: Infinite loop vulnerability in VNC client code. Vulnerability allows attacker to consume excessive amount of resources like CPU and RAM --- --- a/vnc_unixsrc/vncviewer/rfbproto.c +++ b/vnc_unixsrc/vncviewer/rfbproto.c @@ -3156,7 +3156,7 @@ if (db) fprintf(stderr, "Raw: %dx%d+%d+%d\n", rect.r.w, rect.r.h, rect.r.x, rect.r.y); area_raw += rect.r.w * rect.r.h; - while (rect.r.h > 0) { + while (linesToRead && rect.r.h > 0) { if (linesToRead > rect.r.h) { linesToRead = rect.r.h; }