From: Pierre Ossman Date: Fri, 23 Nov 2018 16:35:04 +0000 (+0100) Subject: Fix bad size check in Tight decoder X-Git-Tag: v1.9.90~59 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3648c7042298e89737d29def9856cdbb05b67587;p=tigervnc.git Fix bad size check in Tight decoder Fallout from beb59a43. --- diff --git a/common/rfb/TightDecoder.cxx b/common/rfb/TightDecoder.cxx index c5470534..548c1906 100644 --- a/common/rfb/TightDecoder.cxx +++ b/common/rfb/TightDecoder.cxx @@ -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;