diff options
author | Pierre Ossman <ossman@cendio.se> | 2015-03-03 16:17:51 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2015-03-03 16:17:51 +0100 |
commit | a7bbe9c4a3b2090240173e45bebab86e5cba3b4b (patch) | |
tree | 0bdba695d5126806843d24245ff20b3b16f3a27a /common/rfb/JpegCompressor.cxx | |
parent | 5b3c5f49b103d45ce11cd7c0319c82b95ee61e58 (diff) | |
download | tigervnc-a7bbe9c4a3b2090240173e45bebab86e5cba3b4b.tar.gz tigervnc-a7bbe9c4a3b2090240173e45bebab86e5cba3b4b.zip |
Make sure Exceptions do not use unsafe format strings
Diffstat (limited to 'common/rfb/JpegCompressor.cxx')
-rw-r--r-- | common/rfb/JpegCompressor.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/rfb/JpegCompressor.cxx b/common/rfb/JpegCompressor.cxx index c19af34e..5df0039e 100644 --- a/common/rfb/JpegCompressor.cxx +++ b/common/rfb/JpegCompressor.cxx @@ -123,7 +123,7 @@ JpegCompressor::JpegCompressor(int bufferLen) : MemOutStream(bufferLen) if(setjmp(err->jmpBuffer)) { // this will execute if libjpeg has an error - throw rdr::Exception(err->lastError); + throw rdr::Exception("%s", err->lastError); } jpeg_create_compress(cinfo); @@ -166,7 +166,7 @@ void JpegCompressor::compress(const rdr::U8 *buf, int stride, const Rect& r, jpeg_abort_compress(cinfo); if (srcBufIsTemp && srcBuf) delete[] srcBuf; if (rowPointer) delete[] rowPointer; - throw rdr::Exception(err->lastError); + throw rdr::Exception("%s", err->lastError); } cinfo->image_width = w; |