Hi, Please find the latest report on new defect(s) introduced to digiKam found with Coverity Scan. 10 new defect(s) introduced to digiKam found with Coverity Scan. 15 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 10 of 10 defect(s) ** CID 1324461: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/sendimages/sendimages.cpp: 303 in KIPISendimagesPlugin::SendImages::buildPropertiesFile()() ________________________________________________________________________________________________________ *** CID 1324461: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/sendimages/sendimages.cpp: 303 in KIPISendimagesPlugin::SendImages::buildPropertiesFile()() 297 } 298 299 QFile propertiesFile( d->settings.tempPath + i18n("properties.txt") ); 300 QTextStream stream( &propertiesFile ); 301 stream.setCodec(QTextCodec::codecForName("UTF-8")); 302 stream.setAutoDetectUnicode(true); >>> CID 1324461: Error handling issues (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 303 propertiesFile.open(QIODevice::WriteOnly); 304 stream << propertiesText << QLatin1String("\n"); 305 propertiesFile.close(); 306 d->attachementFiles << QUrl(propertiesFile.fileName()); 307 308 d->progressDlg->progressWidget()->addedAction(i18n("Image properties file done"), SuccessMessage); ** CID 1324460: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/mediawiki/wikimediajob.cpp: 145 in KIPIWikiMediaPlugin::WikiMediaJob::uploadHandle(KJob *)() ________________________________________________________________________________________________________ *** CID 1324460: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/mediawiki/wikimediajob.cpp: 145 in KIPIWikiMediaPlugin::WikiMediaJob::uploadHandle(KJob *)() 139 QMap<QString,QString> info = d->imageDesc.take(keys.first()); 140 Upload* const e1 = new Upload(*d->mediawiki, this); 141 142 qCDebug(KIPIPLUGINS_LOG) << "Path:" << keys.first(); 143 144 QFile* const file = new QFile(keys.first(),this); >>> CID 1324460: Error handling issues (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 145 file->open(QIODevice::ReadOnly); 146 //emit fileUploadProgress(done = 0, total file.size()); 147 148 e1->setFile(file); 149 d->currentFile = file->fileName(); 150 qCDebug(KIPIPLUGINS_LOG) << "Name:" << file->fileName(); ** CID 1324459: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/kmlexport/kmlexport.cpp: 516 in KIPIKMLExportPlugin::KmlExport::generate()() ________________________________________________________________________________________________________ *** CID 1324459: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/kmlexport/kmlexport.cpp: 516 in KIPIKMLExportPlugin::KmlExport::generate()() 510 "No position data for %1 pictures", defectImage)); 511 } 512 513 /** @todo change to kml or kmz if compressed */ 514 QFile file(m_tempDestDir.filePath(m_KMLFileName + QLatin1String(".kml"))); 515 /** @todo handle file opening problems */ >>> CID 1324459: Error handling issues (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 516 file.open( QIODevice::WriteOnly ); 517 QTextStream stream( &file ); // we will serialize the data into the file 518 stream << m_kmlDocument->toString(); 519 file.close(); 520 521 delete m_kmlDocument; ** CID 1324458: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/kmlexport/kmlexport.cpp: 191 in KIPIKMLExportPlugin::KmlExport::generateImagesthumb(const QUrl &, QDomElement &)() ________________________________________________________________________________________________________ *** CID 1324458: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/kmlexport/kmlexport.cpp: 191 in KIPIKMLExportPlugin::KmlExport::generateImagesthumb(const QUrl &, QDomElement &)() 185 { 186 logWarning(i18n("Format of image '%1' is unknown",path)); 187 return; 188 } 189 190 imageFile.close(); >>> CID 1324458: Error handling issues (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 191 imageFile.open(QIODevice::ReadOnly); 192 193 QByteArray imageData = imageFile.readAll(); 194 QImage image; 195 196 if (!image.loadFromData(imageData) ) ** CID 1324457: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 387 in KIPIFlashExportPlugin::SimpleViewer::exportImages()() ________________________________________________________________________________________________________ *** CID 1324457: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 387 in KIPIFlashExportPlugin::SimpleViewer::exportImages()() 381 382 d->progressWdg->addedAction(i18n("Creating images and thumbnails..."), StartingMessage); 383 384 QUrl xmlFile(d->tempDir->path()); 385 386 QFile file(xmlFile.path()); >>> CID 1324457: Error handling issues (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 387 file.open(QIODevice::WriteOnly); 388 389 // header of gallery.xml 390 QDomElement galleryElem; 391 QDomElement photosElem; 392 QDomDocument xmlDoc; ** CID 1324456: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/common/libkipiplugins/widgets/kpimageslist.cpp: 1061 in KIPIPlugins::KPImagesList::slotSaveItems()() ________________________________________________________________________________________________________ *** CID 1324456: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/common/libkipiplugins/widgets/kpimageslist.cpp: 1061 in KIPIPlugins::KPImagesList::slotSaveItems()() 1055 { 1056 qCDebug(KIPIPLUGINS_LOG) << "empty url "; 1057 return; 1058 } 1059 1060 QFile file(saveLevelsFile.path() /*.prettyUrl().toAscii()*/); >>> CID 1324456: Error handling issues (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 1061 file.open(QIODevice::WriteOnly); 1062 // file.open(stdout, QIODevice::WriteOnly); 1063 1064 QXmlStreamWriter xmlWriter; 1065 xmlWriter.setDevice(&file); 1066 ** CID 1324455: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/common/libkipiplugins/widgets/kpimageslist.cpp: 1000 in KIPIPlugins::KPImagesList::slotLoadItems()() ________________________________________________________________________________________________________ *** CID 1324455: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/common/libkipiplugins/widgets/kpimageslist.cpp: 1000 in KIPIPlugins::KPImagesList::slotLoadItems()() 994 return; 995 } 996 997 QFile file(loadLevelsFile.path()); 998 999 qCDebug(KIPIPLUGINS_LOG) << "file path " << loadLevelsFile.path(); >>> CID 1324455: Error handling issues (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 1000 file.open(QIODevice::ReadOnly); 1001 QXmlStreamReader xmlReader; 1002 xmlReader.setDevice(&file); 1003 1004 while (!xmlReader.atEnd()) 1005 { ** CID 1324454: (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 810 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 822 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 841 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 853 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 872 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 910 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 928 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 938 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() ________________________________________________________________________________________________________ *** CID 1324454: (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 810 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() 804 //TODO: errormsg 805 qCDebug(KIPIPLUGINS_LOG) << "No indexTemplateName" ; 806 return false; 807 } 808 809 QFile infile(indexTemplateName); >>> CID 1324454: (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 810 infile.open(QIODevice::ReadOnly); 811 QTextStream in(&infile); 812 QString indexTemplate = in.readAll(); 813 infile.close(); 814 815 indexTemplate.replace(QStringLiteral("{TITLE}"), d->settings->title); /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 822 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() 816 indexTemplate.replace(QStringLiteral("{COLOR}"), d->settings->textColor.name()); 817 indexTemplate.replace(QStringLiteral("{BGCOLOR}"), d->settings->backgroundColor.name()); 818 indexTemplate.replace(QStringLiteral("{HOSTURL}"), d->hostUrl); 819 indexTemplate.replace(QStringLiteral("{HOSTNAME}"), d->hostName); 820 821 QFile outfile(d->tempDir->path() + QStringLiteral("/index.html")); >>> CID 1324454: (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 822 outfile.open(QIODevice::WriteOnly); 823 QTextStream out(&outfile); 824 out << indexTemplate; 825 outfile.close(); 826 break; 827 } /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 841 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() 835 //TODO: errormsg 836 qCDebug(KIPIPLUGINS_LOG) << "No indexTemplateName" ; 837 return false; 838 } 839 840 QFile infile(indexTemplateName); >>> CID 1324454: (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 841 infile.open(QIODevice::ReadOnly); 842 QTextStream in(&infile); 843 QString indexTemplate = in.readAll(); 844 infile.close(); 845 846 indexTemplate.replace(QStringLiteral("{TITLE}"), d->settings->title); /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 853 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() 847 indexTemplate.replace(QStringLiteral("{COLOR}"), d->settings->textColor.name()); 848 indexTemplate.replace(QStringLiteral("{BGCOLOR}"), d->settings->backgroundColor.name()); 849 //indexTemplate.replace("{HOSTNAME}", d->hostName); 850 //indexTemplate.replace("{HOSTURL}", d->hostUrl); 851 852 QFile outfile(d->tempDir->path() + QStringLiteral("/index.html")); >>> CID 1324454: (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 853 outfile.open(QIODevice::WriteOnly); 854 QTextStream out(&outfile); 855 out << indexTemplate; 856 outfile.close(); 857 break; 858 } /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 872 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() 866 //TODO: errormsg 867 qCDebug(KIPIPLUGINS_LOG) << "No indexTemplateName" ; 868 return false; 869 } 870 871 QFile infile(indexTemplateName); >>> CID 1324454: (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 872 infile.open(QIODevice::ReadOnly); 873 QTextStream in(&infile); 874 QString indexTemplate = in.readAll(); 875 infile.close(); 876 877 indexTemplate.replace(QStringLiteral("{TITLE}"), d->settings->title); /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 910 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() 904 QLatin1Char('#'), QStringLiteral("0x"))); 905 indexTemplate.replace(QStringLiteral("{BACKOUTCOLOR}"), 906 d->settings->bkgndOuterColor.name().replace( 907 QLatin1Char('#'), QStringLiteral("0x"))); 908 909 QFile outfile(d->tempDir->path() + QStringLiteral("/index.html")); >>> CID 1324454: (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 910 outfile.open(QIODevice::WriteOnly); 911 QTextStream out(&outfile); 912 out << indexTemplate; 913 outfile.close(); 914 break; 915 } /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 928 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() 922 //TODO: errormsg 923 qCDebug(KIPIPLUGINS_LOG) << "No indexTemplateName" ; 924 return false; 925 } 926 927 QFile infile(indexTemplateName); >>> CID 1324454: (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 928 infile.open(QIODevice::ReadOnly); 929 QTextStream in(&infile); 930 QString indexTemplate = in.readAll(); 931 infile.close(); 932 933 indexTemplate.replace(QStringLiteral("{TITLE}"), d->settings->title); /home/gilles/Devel/5.x/extra/kipi-plugins/flashexport/simpleviewer.cpp: 938 in KIPIFlashExportPlugin::SimpleViewer::createIndex() const() 932 933 indexTemplate.replace(QStringLiteral("{TITLE}"), d->settings->title); 934 indexTemplate.replace(QStringLiteral("{COLOR}"), d->settings->textColor.name()); 935 indexTemplate.replace(QStringLiteral("{BGCOLOR}"), d->settings->backgroundColor.name()); 936 937 QFile outfile(d->tempDir->path() + QStringLiteral("/index.html")); >>> CID 1324454: (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 938 outfile.open(QIODevice::WriteOnly); 939 QTextStream out(&outfile); 940 out << indexTemplate; 941 outfile.close(); 942 break; 943 } ** CID 1324453: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/piwigo/piwigotalker.cpp: 98 in KIPIPiwigoExportPlugin::PiwigoTalker::computeMD5Sum(const QString &)() ________________________________________________________________________________________________________ *** CID 1324453: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/piwigo/piwigotalker.cpp: 98 in KIPIPiwigoExportPlugin::PiwigoTalker::computeMD5Sum(const QString &)() 92 } 93 94 QByteArray PiwigoTalker::computeMD5Sum(const QString& filepath) 95 { 96 QFile file(filepath); 97 >>> CID 1324453: Error handling issues (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 98 file.open(QIODevice::ReadOnly); 99 QByteArray md5sum = QCryptographicHash::hash(file.readAll(), QCryptographicHash::Md5); 100 file.close(); 101 102 return md5sum; 103 } ** CID 1324452: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/piwigo/piwigotalker.cpp: 818 in KIPIPiwigoExportPlugin::PiwigoTalker::addNextChunk()() ________________________________________________________________________________________________________ *** CID 1324452: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/extra/kipi-plugins/piwigo/piwigotalker.cpp: 818 in KIPIPiwigoExportPlugin::PiwigoTalker::addNextChunk()() 812 void PiwigoTalker::addNextChunk() 813 { 814 m_job = 0; 815 816 QFile imagefile(m_path); 817 >>> CID 1324452: Error handling issues (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 88 out of 106 times). 818 imagefile.open(QIODevice::ReadOnly); 819 820 m_chunkId++; // We start with chunk 1 821 822 imagefile.seek((m_chunkId - 1) * CHUNK_MAX_SIZE); 823 ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/digikam?tab=overview To manage Coverity Scan email notifications for "[hidden email]", click https://scan.coverity.com/subscriptions/edit?email=digikam-devel%40kde.org&token=621bfe7450f4a870432a2a9c106aa3a8 _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |