[poppler] qt4/src

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Mon Sep 17 17:32:01 PDT 2007


 qt4/src/poppler-document.cc |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
diff-tree b96db4ad27535c2666fccdfe0a3c04cc7c37792d (from 2a495f19d4465e15fd2fa96656d904315c79a443)
Author: Jeff Muizelaar <jeff at freiheit.infidigm.net>
Date:   Mon Sep 17 20:28:38 2007 -0400

    Avoid double free caused by 302 merge
    
    The ownership of the the string returned by getKey() changed with the 302 merge
    but this code was not updated. Found by Matthew Woehlke.

diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc
index 7985adc..e34b1f2 100644
--- a/qt4/src/poppler-document.cc
+++ b/qt4/src/poppler-document.cc
@@ -274,9 +274,7 @@ namespace Poppler {
 	Dict *infoDict = info.getDict();
 	// somehow iterate over keys in infoDict
 	for( int i=0; i < infoDict->getLength(); ++i ) {
-	    const char *aux = infoDict->getKey(i);
-	    keys.append( QString::fromAscii(aux) );
-	    delete[] aux;
+	    keys.append( QString::fromAscii(infoDict->getKey(i)) );
 	}
 
 	info.free();


More information about the poppler mailing list