Update of /cvs/poppler/poppler/qt4/src
In directory kemper:/tmp/cvs-serv30834/qt4/src

Modified Files:
        poppler-private.h 
Log Message:
        * poppler/Annot.cc: avoid crashing if the font for the drawing methods
        can not be found
        * poppler/Form.cc: fix memory leak
        * qt4/src/poppler-private.h: fix the UnicodeParsedString function to
        really work and not crash
        * splash/SplashTypes.h: RGB8X mode makes max number of components in
        any SplashColor always be 4


Index: poppler-private.h
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-private.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- poppler-private.h   17 May 2007 21:32:57 -0000      1.28
+++ poppler-private.h   21 May 2007 21:29:10 -0000      1.29
@@ -61,11 +61,14 @@
     }
 
     static QString UnicodeParsedString(GooString *s1) {
+        if ( !s1 || s1->getLength() == 0 )
+            return QString();
+
         GBool isUnicode;
         int i;
         Unicode u;
         QString result;
-        if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getChar(1) & 0xff ) == 
0xff )
+        if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getLength() > 1 && ( 
s1->getChar(1) & 0xff ) == 0xff ) )
         {
             isUnicode = gTrue;
             i = 2;

_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to