incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject svn commit: r1362935 - /incubator/ooo/branches/AOO34/main/svtools/source/filter/jpeg/jpegc.c
Date Wed, 18 Jul 2012 13:18:52 GMT
Author: hdu
Date: Wed Jul 18 13:18:51 2012
New Revision: 1362935

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

Patch-by: orw
Tested-by: orw

Merged from https://svn.apache.org/repos/asf/incubator/ooo/trunk r1362824 

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

Modified: incubator/ooo/branches/AOO34/main/svtools/source/filter/jpeg/jpegc.c
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/svtools/source/filter/jpeg/jpegc.c?rev=1362935&r1=1362934&r2=1362935&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/svtools/source/filter/jpeg/jpegc.c (original)
+++ incubator/ooo/branches/AOO34/main/svtools/source/filter/jpeg/jpegc.c Wed Jul 18 13:18:51
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