[poppler] poppler/JPEG2000Stream.cc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Mar 22 11:37:04 UTC 2020
poppler/JPEG2000Stream.cc | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 4382264f1b96e6ad6c9e481e4ceae3c22dbcd2f3
Author: Albert Astals Cid <aacid at kde.org>
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) {
More information about the poppler
mailing list