]> source.dussan.org Git - tigervnc.git/commitdiff
Fix bad size check in Tight decoder
authorPierre Ossman <ossman@cendio.se>
Fri, 23 Nov 2018 16:35:04 +0000 (17:35 +0100)
committerPierre Ossman <ossman@cendio.se>
Fri, 23 Nov 2018 16:35:04 +0000 (17:35 +0100)
Fallout from beb59a43.

common/rfb/TightDecoder.cxx

index c5470534502a7060f34e0dc361f2b5c2b8982ab5..548c1906c98e0b3d060b7094694a05db3cf9e5c4 100644 (file)
@@ -269,7 +269,7 @@ void TightDecoder::decodeRect(const Rect& r, const void* buffer,
         size_t len = palSize * 3;
         rdr::U8Array tightPalette(len);
 
-        assert(buflen >= sizeof(len));
+        assert(buflen >= len);
 
         memcpy(tightPalette.buf, bufptr, len);
         bufptr += len;