incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject svn commit: r1362824 - /incubator/ooo/trunk/main/svtools/source/filter/jpeg/jpegc.c
Date Wed, 18 Jul 2012 09:16:31 GMT
Author: hdu
Date: Wed Jul 18 09:16:30 2012
New Revision: 1362824

URL: http://svn.apache.org/viewvc?rev=1362824&view=rev
Log:
#i120306# cleanup failed loading of problematic jpeg

Patch-by: orw
Tested-by: orw

Modified:
    incubator/ooo/trunk/main/svtools/source/filter/jpeg/jpegc.c

Modified: incubator/ooo/trunk/main/svtools/source/filter/jpeg/jpegc.c
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svtools/source/filter/jpeg/jpegc.c?rev=1362824&r1=1362823&r2=1362824&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svtools/source/filter/jpeg/jpegc.c (original)
+++ incubator/ooo/trunk/main/svtools/source/filter/jpeg/jpegc.c Wed Jul 18 09:16:30 2012
@@ -196,7 +196,15 @@ void ReadJPEG( void* pJPEGReader, void* 
 		}
 	}
 
-	jpeg_finish_decompress( &cinfo );
+    if ( pDIB )
+    {
+        jpeg_finish_decompress( &cinfo );
+    }
+    else
+    {
+        jpeg_abort_decompress( &cinfo );
+    }
+
 	if (pScanLineBuffer!=NULL) {
 	    rtl_freeMemory( pScanLineBuffer );
 	    pScanLineBuffer=NULL;



Mime
View raw message