]> source.dussan.org Git - tigervnc.git/commitdiff
Fix stream check for InStream::getptr() 1522/head
authorPierre Ossman <ossman@cendio.se>
Wed, 24 Aug 2022 14:10:36 +0000 (16:10 +0200)
committerPierre Ossman <ossman@cendio.se>
Thu, 25 Aug 2022 10:52:05 +0000 (12:52 +0200)
This call should have been preceeded by hasData() or avail(), just like
all other accessor functions.

common/rdr/InStream.h

index c02e967fc2ce77aad5c5069da696fbd6a13fc320..26817fb8e8939a93307090e1182765b5a305e171 100644 (file)
@@ -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");