New Defects reported by Coverity Scan for digiKam
scan-admin at coverity.com
scan-admin at coverity.com
Sat Jan 28 11:46:23 GMT 2017
Hi,
Please find the latest report on new defect(s) introduced to digiKam found with Coverity Scan.
3 new defect(s) introduced to digiKam found with Coverity Scan.
10 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 3 of 3 defect(s)
** CID 1399598: Uninitialized members (UNINIT_CTOR)
/home/gilles/Devel/5.x/core/libs/dialogs/imagedialog.cpp: 340 in Digikam::DFileIconProvider::DFileIconProvider()()
________________________________________________________________________________________________________
*** CID 1399598: Uninitialized members (UNINIT_CTOR)
/home/gilles/Devel/5.x/core/libs/dialogs/imagedialog.cpp: 340 in Digikam::DFileIconProvider::DFileIconProvider()()
334
335 DFileIconProvider::DFileIconProvider()
336 : QFileIconProvider()
337 {
338 //ThumbnailLoadThread* const thread = new ThumbnailLoadThread;
339 //m_catcher = new ThumbnailImageCatcher(thread);
>>> CID 1399598: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "m_catcher" is not initialized in this constructor nor in any functions that it calls.
340 }
341
342 DFileIconProvider::~DFileIconProvider()
343 {
344 //m_catcher->thread()->stopAllTasks();
345 //m_catcher->cancel();
** CID 1399597: Security best practices violations (TOCTOU)
/home/gilles/Devel/5.x/core/utilities/imageeditor/core/fileoperation.cpp: 127 in Digikam::FileOperation::localFileRename(const QString &, const QString &, const QString &, bool)()
________________________________________________________________________________________________________
*** CID 1399597: Security best practices violations (TOCTOU)
/home/gilles/Devel/5.x/core/utilities/imageeditor/core/fileoperation.cpp: 127 in Digikam::FileOperation::localFileRename(const QString &, const QString &, const QString &, bool)()
121 return false;
122 }
123
124 #ifndef Q_OS_WIN
125
126 // restore permissions
>>> CID 1399597: Security best practices violations (TOCTOU)
>>> Calling function "chmod" that uses "dstFileName.constData()" after a check function. This can cause a time-of-check, time-of-use race condition.
127 if (::chmod(dstFileName.constData(), filePermissions) != 0)
128 {
129 qCWarning(DIGIKAM_GENERAL_LOG) << "Failed to restore file permissions for file " << dstFileName;
130 }
131
132 #endif // Q_OS_WIN
** CID 1399596: Incorrect expression (IDENTICAL_BRANCHES)
/extra/kipi-plugins/jalbum/plugin_jalbum.moc: 87 in KIPIJAlbumExportPlugin::JAlbumFactory::qt_metacall(QMetaObject::Call, int, void **)()
________________________________________________________________________________________________________
*** CID 1399596: Incorrect expression (IDENTICAL_BRANCHES)
/extra/kipi-plugins/jalbum/plugin_jalbum.moc: 87 in KIPIJAlbumExportPlugin::JAlbumFactory::qt_metacall(QMetaObject::Call, int, void **)()
81 return KPluginFactory::qt_metacast(_clname);
82 }
83
84 int KIPIJAlbumExportPlugin::JAlbumFactory::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
85 {
86 _id = KPluginFactory::qt_metacall(_c, _id, _a);
>>> CID 1399596: Incorrect expression (IDENTICAL_BRANCHES)
>>> The same code is executed when the condition "_id < 0" is true or false, because the code in the if-then branch and after the if statement is identical. Should the if statement be removed?
87 if (_id < 0)
88 return _id;
89 return _id;
90 }
91
92 QT_PLUGIN_METADATA_SECTION const uint qt_section_alignment_dummy = 42;
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZIlZa20oQ0xtvekoaSXYBwgZYh7yqZ4T857KvBwnvzEg-3D-3D_Vulo-2FzB1zz6bqp-2F-2Bl-2FpBD-2BzKk1Nu56XtBupWJitvnTC6Al1jIVoUeREgJ3f2Qwz5aZMboPjJGZ7DsUI0pQfw12Ig2HHgO90jLXWTFCNVavI29ea22WG09RrzFiAmp0-2BeYDuMLhll8M-2FKnaRlzLM6Gbeeaxx50KcLSXZbA8gsYENOxW3Jk46Ejb2vM6KFFUbnSClfZQyAD-2Bt2kWgFT-2BTobEpjL9eRYxbBFRp2MBFQ9es-3D
To manage Coverity Scan email notifications for "digikam-devel at kde.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4g-2BkTwi3e7HlDkvMAkUMj2-2FFhZ2O-2BELTTy-2Fl1ea1gxKqmntchu8-2BeAOkExRtki0102MqL9th0o1rOws5-2F-2FQDFdjkpeJaB-2FdUMxPk-2B7ZQUGV0-3D_Vulo-2FzB1zz6bqp-2F-2Bl-2FpBD-2BzKk1Nu56XtBupWJitvnTC6Al1jIVoUeREgJ3f2Qwz5Zzn694uYcHaQ6FTXANp75GDEU2zDGRB19WbHfOxkIaJb6y4HnzV2PK-2BUYOfZn-2FXF9bc1kYa5Z3ti1grniTyKuOKgaNP7k6U4tGcYupQeWMMp3yTwwLXgx2IvHgEGllZiBHBH3bWgS7w2Cg2NZJ6Xtq82f1yzu5f-2BDAe0A-2FAKSxo-3D
More information about the Digikam-devel
mailing list