r21983 by craig - Coverity 1350052: Unchecked fseek return value

scribus-commit scribus-commit at lists.scribus.net
Sun Apr 23 09:29:46 UTC 2017


Author: craig
Date: Sun Apr 23 09:29:46 2017
New Revision: 21983

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21983
Log:
Coverity 1350052: Unchecked fseek return value

Modified:
    trunk/Scribus/scribus/plugins/import/ai/importai.cpp

Modified: trunk/Scribus/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21983&path=/trunk/Scribus/scribus/plugins/import/ai/importai.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/importai.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/ai/importai.cpp	Sun Apr 23 09:29:46 2017
@@ -725,7 +725,11 @@
 	source = fopen(fName.toLocal8Bit().constData(), "rb");
 	if (!source)
 		return false;
-	fseek(source, 20, SEEK_SET);
+	if(!fseek(source, 20, SEEK_SET))
+	{
+		fclose(source);
+		return false;
+	}
 	dest = fopen(f2.toLocal8Bit().constData(), "wb");
 	if (!dest)
 	{




More information about the scribus-commit mailing list