You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2012/07/18 15:18:52 UTC

svn commit: r1362935 - /incubator/ooo/branches/AOO34/main/svtools/source/filter/jpeg/jpegc.c

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;