diff options
author | Herbert Dürr <hdu@apache.org> | 2012-07-18 08:16:30 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-03-06 12:31:43 +0000 |
commit | 6374ae0721a5e5da9ed1a477f9642feba01199a6 (patch) | |
tree | 2b62f89381c22426e3d998dc151df185fb022974 | |
parent | c407de35fb9ebf1a585fe490dbf353f7e1a01dd1 (diff) |
Resolves: #i120306# cleanup failed loading of problematic jpeg
Patch-by: orw
Tested-by: orw
(cherry picked from commit 52c755f84a4755982d0f0933986c292d199a34f0)
Conflicts:
svtools/source/filter/jpeg/jpegc.c
Change-Id: Ic0686ad44fcd527fc6f182748e255daceac2089e
-rw-r--r-- | vcl/source/filter/jpeg/jpegc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/source/filter/jpeg/jpegc.c b/vcl/source/filter/jpeg/jpegc.c index 0f92948b45da..7e2ae48fe264 100644 --- a/vcl/source/filter/jpeg/jpegc.c +++ b/vcl/source/filter/jpeg/jpegc.c @@ -194,7 +194,14 @@ void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ) } } - jpeg_finish_decompress( &cinfo ); + if ( pDIB ) + { + jpeg_finish_decompress( &cinfo ); + } + else + { + jpeg_abort_decompress( &cinfo ); + } if (pScanLineBuffer!=NULL) { rtl_freeMemory( pScanLineBuffer ); pScanLineBuffer=NULL; |