r21981 by craig - Coverity 1350047: QFile open unchecked return value
scribus-commit
scribus-commit at lists.scribus.net
Sun Apr 23 09:16:25 UTC 2017
Author: craig
Date: Sun Apr 23 09:16:25 2017
New Revision: 21981
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21981
Log:
Coverity 1350047: QFile open unchecked return value
Modified:
trunk/Scribus/scribus/ui/resourcemanager.cpp
Modified: trunk/Scribus/scribus/ui/resourcemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21981&path=/trunk/Scribus/scribus/ui/resourcemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/resourcemanager.cpp (original)
+++ trunk/Scribus/scribus/ui/resourcemanager.cpp Sun Apr 23 09:16:25 2017
@@ -1363,10 +1363,9 @@
{
QString destinationFolder=findDestinationFolder();
QFile dataFile(destinationFolder + licenceFileName);
- if (dataFile.exists())
+ if (dataFile.exists() && dataFile.open(QIODevice::ReadOnly))
{
QTextStream ts(&dataFile);
- dataFile.open(QIODevice::ReadOnly);
data = ts.readAll();
dataFile.close();
doDownload=false;
More information about the scribus-commit
mailing list