[poppler] 3 commits - poppler/GfxState.cc poppler/PSOutputDev.cc poppler/TextOutputDev.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Tue May 3 23:08:03 UTC 2016


 poppler/GfxState.cc      |    3 +--
 poppler/PSOutputDev.cc   |    6 ++++--
 poppler/TextOutputDev.cc |    4 ++--
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 3707f9d17c5f8a883ddb9614b11676ad49ade5b2
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed May 4 00:59:01 2016 +0200

    Fix potential crash in TextPage::coalesce
    
    When flows is not null flow was still pointing to an now deleted flow that
    may had made it crash in the for loop below

diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index afd8959..cf39bd8 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -20,7 +20,7 @@
 // Copyright (C) 2006 Jeff Muizelaar <jeff at infidigm.net>
 // Copyright (C) 2007, 2008, 2012 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2008 Koji Otani <sho at bbr.jp>
-// Copyright (C) 2008, 2010-2012, 2014, 2015 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2008, 2010-2012, 2014-2016 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2008 Pino Toscano <pino at kde.org>
 // Copyright (C) 2008, 2010 Hib Eris <hib at hiberis.nl>
 // Copyright (C) 2009 Ross Moore <ross at maths.mq.edu.au>
@@ -3763,12 +3763,12 @@ void TextPage::coalesce(GBool physLayout, double fixedPitch, GBool doHTML) {
   // build the flows
   //~ this needs to be adjusted for writing mode (vertical text)
   //~ this also needs to account for right-to-left column ordering
-  flow = NULL;
   while (flows) {
     flow = flows;
     flows = flows->next;
     delete flow;
   }
+  flow = NULL;
   flows = lastFlow = NULL;
   // assume blocks are already in reading order,
   // and construct flows accordingly.
commit 6d26d02c39de6546f57b20c46922f8c56aad78a0
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed May 4 00:58:12 2016 +0200

    Remove call that does nothing
    
    We don't use dict after this call and streamGetDict is a pure getter, i.e. it doesn't change the stream at all

diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index 25196b4..d6b9462 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -16,7 +16,7 @@
 // Copyright (C) 2005 Kristian Høgsberg <krh at redhat.com>
 // Copyright (C) 2006, 2007 Jeff Muizelaar <jeff at infidigm.net>
 // Copyright (C) 2006, 2010 Carlos Garcia Campos <carlosgc at gnome.org>
-// Copyright (C) 2006-2015 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006-2016 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2009, 2012 Koji Otani <sho at bbr.jp>
 // Copyright (C) 2009, 2011-2016 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2009 Christian Persch <chpe at gnome.org>
@@ -2033,7 +2033,6 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState
 
 #ifdef USE_CMS
   arr->get(1, &obj1);
-  dict = obj1.streamGetDict();
   Guchar *profBuf;
   Stream *iccStream = obj1.getStream();
   int length = 0;
commit 56c71fcaae71c2b3cc91bb981715541518e05684
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed May 4 00:55:06 2016 +0200

    Fix memory leak in PSOutputDev::filterPSLabel

diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index a260727..204f16e 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -15,7 +15,7 @@
 //
 // Copyright (C) 2005 Martin Kretzschmar <martink at gnome.org>
 // Copyright (C) 2005, 2006 Kristian Høgsberg <krh at redhat.com>
-// Copyright (C) 2006-2009, 2011-2013, 2015 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006-2009, 2011-2013, 2015, 2016 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2006 Jeff Muizelaar <jeff at infidigm.net>
 // Copyright (C) 2007, 2008 Brad Hards <bradh at kde.org>
 // Copyright (C) 2008, 2009 Koji Otani <sho at bbr.jp>
@@ -7656,8 +7656,10 @@ GooString* PSOutputDev::filterPSLabel(GooString *label, GBool *needParens) {
     } else if (c == '(') {
       label2->append("\\(");
     } else if (c < 0x20 || c > 0x7e) {
-      label2->append(GooString::format("\\{0:03o}", c));
+      GooString *aux = GooString::format("\\{0:03o}", c);
+      label2->append(aux);
       j += 4;
+      delete aux;
     } else {
       label2->append(c);
       ++j;


More information about the poppler mailing list