[poppler] poppler/JBIG2Stream.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 28 21:03:22 UTC 2019


 poppler/JBIG2Stream.cc |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 3cc40be2c545b833d518994d9e459376e6858cb1
Author: Albert Astals Cid <aacid at kde.org>
Date:   Mon Jan 28 22:02:52 2019 +0100

    JBIG2Stream: Free huffTab if buildTable fails

diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 9670e895..1795f144 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -15,7 +15,7 @@
 //
 // Copyright (C) 2006 Raj Kumar <rkumar at archive.org>
 // Copyright (C) 2006 Paul Walmsley <paul at booyaka.com>
-// Copyright (C) 2006-2010, 2012, 2014-2018 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006-2010, 2012, 2014-2019 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2009 David Benjamin <davidben at mit.edu>
 // Copyright (C) 2011 Edward Jiang <ejiang at google.com>
 // Copyright (C) 2012 William Bader <williambader at hotmail.com>
@@ -4150,6 +4150,8 @@ void JBIG2Stream::readCodeTableSeg(unsigned int segNum, unsigned int length) {
   if (JBIG2HuffmanDecoder::buildTable(huffTab, i)) {
     // create and store the new table segment
     segments->push_back(new JBIG2CodeTable(segNum, huffTab));
+  } else {
+    free(huffTab);
   }
 
   return;


More information about the poppler mailing list