r21982 by craig - Coverity 1350051: QFile open unchecked return value

scribus-commit scribus-commit at lists.scribus.net
Sun Apr 23 09:20:10 UTC 2017


Author: craig
Date: Sun Apr 23 09:20:10 2017
New Revision: 21982

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21982
Log:
Coverity 1350051: QFile open unchecked return value

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

Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21982&path=/trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp	Sun Apr 23 09:20:10 2017
@@ -309,7 +309,7 @@
  
  void StyleReader::styleStyle(const QXmlAttributes& attrs)
  {
- 	QString name = "";
+	QString name;
  	QString listName = NULL;
 	bool setDefaultStyle = false;
  	bool isParaStyle = false;

Modified: trunk/Scribus/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21982&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:20:10 2017
@@ -622,7 +622,11 @@
 	bool ret = false;
 #ifdef HAVE_PODOFO
 	QFile outf(outfile);
-	outf.open(QIODevice::WriteOnly);
+	if (!outf.open(QIODevice::WriteOnly))
+	{
+		qDebug()<<"Failed to open QFile outf in AIPlug::extractFromPDF";
+		return false;
+	}
 	try
 	{
 		PoDoFo::PdfError::EnableDebug( false );




More information about the scribus-commit mailing list