[poppler] Branch 'poppler-0.6' - qt/poppler-document.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Fri Nov 23 14:09:10 PST 2007
qt/poppler-document.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 2b41acd63d93292e01fee9e0d08ddfd4ed55fed4
Author: Albert Astals Cid <aacid at kde.org>
Date: Fri Nov 23 23:04:40 2007 +0100
sscanf does not like null strings, so don't call it on empty qstrings
diff --git a/qt/poppler-document.cc b/qt/poppler-document.cc
index 4c5b8d0..4af6d55 100644
--- a/qt/poppler-document.cc
+++ b/qt/poppler-document.cc
@@ -218,7 +218,7 @@ QDateTime Document::getDate( const QString & type ) const
s = s.mid(2);
/* FIXME process time zone on systems that support it */
- if ( sscanf( s.latin1(), "%4d%2d%2d%2d%2d%2d", &year, &mon, &day, &hour, &min, &sec ) == 6 )
+ if ( !s.isEmpty() && sscanf( s.latin1(), "%4d%2d%2d%2d%2d%2d", &year, &mon, &day, &hour, &min, &sec ) == 6 )
{
/* Workaround for y2k bug in Distiller 3 stolen from gpdf, hoping that it won't
* * be used after y2.2k */
More information about the poppler
mailing list