r20137 by avox - fix uninitialized var

scribus-commit scribus-commit at lists.scribus.net
Tue May 26 23:19:04 UTC 2015


Author: avox
Date: Tue May 26 23:19:04 2015
New Revision: 20137

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20137
Log:
fix uninitialized var

Modified:
    trunk/Scribus/scribus/fonts/cff.cpp

Modified: trunk/Scribus/scribus/fonts/cff.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20137&path=/trunk/Scribus/scribus/fonts/cff.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/cff.cpp (original)
+++ trunk/Scribus/scribus/fonts/cff.cpp Tue May 26 23:19:04 2015
@@ -815,11 +815,14 @@
 		QList<QByteArray> result;
 		uint N = readCard(pos);
 		pos += 2;
+		if (N == 0)
+			return result;
+
 		uint offSize = bytes[pos++];
 		uint dataStart = pos + offSize * (N+1) - 1;
 		qDebug() << "size" << N << "offsetsize" << offSize << "dataStart" << dataStart;
 		uint start = 0;
-		uint end;
+		uint end = 0;
 		for (uint c = 0; c < offSize; ++c)
 		{
 			start = start << 8 | (uchar) bytes[pos++];




More information about the scribus-commit mailing list