Skip to content

Commit

Permalink
Fix stream check for InStream::getptr()
Browse files Browse the repository at this point in the history
This call should have been preceeded by hasData() or avail(), just like
all other accessor functions.
  • Loading branch information
CendioOssman committed Aug 25, 2022
1 parent f2bbb6b commit 7b1be72
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions common/rdr/InStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 7b1be72

Please sign in to comment.