diff options
author | Pierre Ossman <ossman@cendio.se> | 2012-07-19 11:06:27 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2012-07-19 11:06:27 +0000 |
commit | 229229648fa3c2e035306d1845a20c9240b1a383 (patch) | |
tree | 8f2b7373156312881dee988acc44fa5158a6bbec /common/rfb/CMsgReader.cxx | |
parent | e211518b65cf72a5be0b9bb9a71fa715196bed19 (diff) | |
download | tigervnc-229229648fa3c2e035306d1845a20c9240b1a383.tar.gz tigervnc-229229648fa3c2e035306d1845a20c9240b1a383.zip |
Also check for negative encodings, in case the server is throwing unexpected
garbage at us.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4942 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/CMsgReader.cxx')
-rw-r--r-- | common/rfb/CMsgReader.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/rfb/CMsgReader.cxx b/common/rfb/CMsgReader.cxx index e3b73bf5..63d31d1a 100644 --- a/common/rfb/CMsgReader.cxx +++ b/common/rfb/CMsgReader.cxx @@ -100,7 +100,7 @@ void CMsgReader::readRect(const Rect& r, int encoding) readCopyRect(r); } else { - if (encoding > encodingMax) { + if (!Decoder::supported(encoding)) { fprintf(stderr, "Unknown rect encoding %d\n", encoding); throw Exception("Unknown rect encoding"); } |