poppler/JPEG2000Stream.cc | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 4382264f1b96e6ad6c9e481e4ceae3c22dbcd2f3
Author: Albert Astals Cid <[email protected]>
Date: Sun Mar 22 12:32:02 2020 +0100
Fix leak in broken files
oss-fuzz/21330
diff --git a/poppler/JPEG2000Stream.cc b/poppler/JPEG2000Stream.cc
index 123da94a..997f1915 100644
--- a/poppler/JPEG2000Stream.cc
+++ b/poppler/JPEG2000Stream.cc
@@ -357,6 +357,10 @@ void JPXStreamPrivate::init2(OPJ_CODEC_FORMAT format,
unsigned char *buf, int le
return;
error:
+ if (image != nullptr) {
+ opj_image_destroy(image);
+ image = nullptr;
+ }
opj_stream_destroy(stream);
opj_destroy_codec(decoder);
if (format == OPJ_CODEC_JP2) {
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler