From 7b1be722afac02794708e434b8436082c9ce5a99 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 24 Aug 2022 16:10:36 +0200 Subject: [PATCH] Fix stream check for InStream::getptr() This call should have been preceeded by hasData() or avail(), just like all other accessor functions. --- common/rdr/InStream.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/common/rdr/InStream.h b/common/rdr/InStream.h index c02e967f..26817fb8 100644 --- a/common/rdr/InStream.h +++ b/common/rdr/InStream.h @@ -166,9 +166,6 @@ namespace rdr { // some other stream API. inline const U8* getptr(size_t length) { check(length); -#ifdef RFB_INSTREAM_CHECK - checkedBytes += length; -#endif return ptr; } inline void setptr(size_t length) { if (length > avail()) throw Exception("Input stream overflow"); -- 2.39.5