Make sure Exceptions do not use unsafe format strings
diff --git a/common/rfb/JpegDecompressor.cxx b/common/rfb/JpegDecompressor.cxx
index ca1ad22..70a4276 100644
--- a/common/rfb/JpegDecompressor.cxx
+++ b/common/rfb/JpegDecompressor.cxx
@@ -116,7 +116,7 @@
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_decompress(dinfo);
@@ -162,7 +162,7 @@
jpeg_abort_decompress(dinfo);
if (dstBufIsTemp && dstBuf) delete[] dstBuf;
if (rowPointer) delete[] rowPointer;
- throw rdr::Exception(err->lastError);
+ throw rdr::Exception("%s", err->lastError);
}
src->pub.next_input_byte = jpegBuf;