Rebased ref, commits from common ancestor:
commit d83b11300386c7f0364acff06bd809e9efcbe4ca
Author: Albert Astals Cid <[email protected]>
Date:   Tue May 9 16:08:18 2017 +0200

    JPXStreamPrivate::init2 - Fix memory leak in broken files

diff --git a/poppler/JPEG2000Stream.cc b/poppler/JPEG2000Stream.cc
index d20fa417..2b6af900 100644
--- a/poppler/JPEG2000Stream.cc
+++ b/poppler/JPEG2000Stream.cc
@@ -501,6 +501,7 @@ void JPXStreamPrivate::init2(OPJ_CODEC_FORMAT format, 
unsigned char *buf, int le
     return;
 
 error:
+  opj_stream_destroy(stream);
   opj_destroy_codec(decoder);
   if (format == OPJ_CODEC_JP2) {
     error(errSyntaxWarning, -1, "Did no succeed opening JPX Stream as JP2, 
trying as J2K.");
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to