[poppler] Branch 'poppler-0.12' - poppler/DCTStream.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Nov 12 15:56:53 PST 2009


 poppler/DCTStream.cc |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit f385ca47a2e6da332e7c216db439296993361556
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Nov 13 00:55:37 2009 +0100

    jpeg_start_decompress can fail, check it
    
    Fixes KDE bug #214317

diff --git a/poppler/DCTStream.cc b/poppler/DCTStream.cc
index f5ad436..7c6ba70 100644
--- a/poppler/DCTStream.cc
+++ b/poppler/DCTStream.cc
@@ -142,7 +142,11 @@ void DCTStream::reset() {
   jpeg_read_header(&cinfo, TRUE);
   if (src.abort) return;
 
-  jpeg_start_decompress(&cinfo);
+  if (!jpeg_start_decompress(&cinfo))
+  {
+    src.abort = true;
+    return;
+  }
 
   row_stride = cinfo.output_width * cinfo.output_components;
   row_buffer = cinfo.mem->alloc_sarray((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);


More information about the poppler mailing list