New Defects reported by Coverity Scan for digiKam
scan-admin at coverity.com
scan-admin at coverity.com
Tue Oct 5 14:13:54 BST 2021
Hi,
Please find the latest report on new defect(s) introduced to digiKam found with Coverity Scan.
15 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 15 of 15 defect(s)
** CID 1492320: Resource leaks (CTOR_DTOR_LEAK)
________________________________________________________________________________________________________
*** CID 1492320: Resource leaks (CTOR_DTOR_LEAK)
/home/gilles/Devel/7.x/core/dplugins/generic/tools/mediaserver/server/dmediaserver.cpp: 123 in DigikamGenericMediaServerPlugin::DMediaServer::Private::Private()()
117 explicit Private()
118 : upnp (nullptr),
119 logHandler (nullptr),
120 serverHolder(nullptr)
121 {
122 NPT_LogManager::GetDefault().Configure("plist:.level=INFO;.handlers=CustomHandler;");
>>> CID 1492320: Resource leaks (CTOR_DTOR_LEAK)
>>> Calling allocation function "Create".
123 NPT_LogHandler::Create("digiKam", "CustomHandler", logHandler);
124 logHandler->SetCustomHandlerFunction(&UPnPLogger);
125 }
126
127 PLT_UPnP* upnp;
128 NPT_LogHandler* logHandler;
** CID 1492319: Uninitialized variables (UNINIT)
________________________________________________________________________________________________________
*** CID 1492319: Uninitialized variables (UNINIT)
/home/gilles/Devel/7.x/core/libs/database/haar/haar.cpp: 323 in Digikam::Haar::Calculator::getmLargests(double *, int *)()
317 // Fill up the bounded queue. (Assuming NUM_PIXELS_SQUARED > NUM_COEFS)
318
319 for (i = 1 ; i < NumberOfCoefficients+1 ; ++i)
320 {
321 val.i = i;
322 val.d = fabs(cdata[i]);
>>> CID 1492319: Uninitialized variables (UNINIT)
>>> Using uninitialized value "vq.comp" when calling "push".
323 vq.push(val);
324 }
325
326 // Queue is full (size is NUM_COEFS)
327
328 for (/*i = NUM_COEFS+1*/ ; i < NumberOfPixelsSquared ; ++i)
** CID 1485985: (UNCAUGHT_EXCEPT)
/home/gilles/Devel/7.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
/home/gilles/Devel/7.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
/home/gilles/Devel/7.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
/home/gilles/Devel/7.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
________________________________________________________________________________________________________
*** CID 1485985: (UNCAUGHT_EXCEPT)
/home/gilles/Devel/7.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
48 #include "digikam_version.h"
49
50 using namespace Digikam;
51
52 const QString IMAGE_PATH(QFINDTESTDATA("data/testimages/"));
53
>>> CID 1485985: (UNCAUGHT_EXCEPT)
>>> In function "main(int, char **)" an exception of type "std::invalid_argument" is thrown and never caught.
54 int main(int argc, char** argv)
55 {
56 QApplication app(argc, argv);
57
58 if (argc != 2)
59 {
/home/gilles/Devel/7.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
48 #include "digikam_version.h"
49
50 using namespace Digikam;
51
52 const QString IMAGE_PATH(QFINDTESTDATA("data/testimages/"));
53
>>> CID 1485985: (UNCAUGHT_EXCEPT)
>>> In function "main(int, char **)" an exception of type "std::invalid_argument" is thrown and never caught.
54 int main(int argc, char** argv)
55 {
56 QApplication app(argc, argv);
57
58 if (argc != 2)
59 {
/home/gilles/Devel/7.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
48 #include "digikam_version.h"
49
50 using namespace Digikam;
51
52 const QString IMAGE_PATH(QFINDTESTDATA("data/testimages/"));
53
>>> CID 1485985: (UNCAUGHT_EXCEPT)
>>> In function "main(int, char **)" an exception of type "std::invalid_argument" is thrown and never caught.
54 int main(int argc, char** argv)
55 {
56 QApplication app(argc, argv);
57
58 if (argc != 2)
59 {
/home/gilles/Devel/7.x/core/tests/database/checkdatabaseswitch_cli.cpp: 54 in main()
48 #include "digikam_version.h"
49
50 using namespace Digikam;
51
52 const QString IMAGE_PATH(QFINDTESTDATA("data/testimages/"));
53
>>> CID 1485985: (UNCAUGHT_EXCEPT)
>>> In function "main(int, char **)" an exception of type "std::invalid_argument" is thrown and never caught.
54 int main(int argc, char** argv)
55 {
56 QApplication app(argc, argv);
57
58 if (argc != 2)
59 {
** CID 1485983: Error handling issues (UNCAUGHT_EXCEPT)
/home/gilles/Devel/7.x/core/tests/database/checkdatabaseinit_cli.cpp: 54 in main()
________________________________________________________________________________________________________
*** CID 1485983: Error handling issues (UNCAUGHT_EXCEPT)
/home/gilles/Devel/7.x/core/tests/database/checkdatabaseinit_cli.cpp: 54 in main()
48 #include "digikam_version.h"
49
50 using namespace Digikam;
51
52 const QString IMAGE_PATH(QFINDTESTDATA("data/testimages/"));
53
>>> CID 1485983: Error handling issues (UNCAUGHT_EXCEPT)
>>> In function "main(int, char **)" an exception of type "std::invalid_argument" is thrown and never caught.
54 int main(int argc, char** argv)
55 {
56 QApplication app(argc, argv);
57
58 if (argc != 2)
59 {
** CID 1485058: Resource leaks (RESOURCE_LEAK)
/home/gilles/Devel/7.x/core/libs/album/treeview/albumlabelssearchhandler.cpp: 519 in Digikam::AlbumLabelsSearchHandler::slotCheckStateChanged()()
________________________________________________________________________________________________________
*** CID 1485058: Resource leaks (RESOURCE_LEAK)
/home/gilles/Devel/7.x/core/libs/album/treeview/albumlabelssearchhandler.cpp: 519 in Digikam::AlbumLabelsSearchHandler::slotCheckStateChanged()()
513 }
514
515 emit checkStateChanged(album, Qt::Checked);
516 }
517
518 d->oldXml = currentXml;
>>> CID 1485058: Resource leaks (RESOURCE_LEAK)
>>> Variable "album" going out of scope leaks the storage it points to.
519 }
520
521 void AlbumLabelsSearchHandler::slotSetCurrentAlbum()
522 {
523 slotSelectionChanged();
524 }
** CID 1470383: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/7.x/core/dplugins/generic/webservices/mediawiki/backend/mediawiki_imageinfo.h: 41 in ()
________________________________________________________________________________________________________
*** CID 1470383: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/7.x/core/dplugins/generic/webservices/mediawiki/backend/mediawiki_imageinfo.h: 41 in ()
35 namespace MediaWiki
36 {
37
38 /**
39 * @brief An image info.
40 */
>>> CID 1470383: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "MediaWiki::Imageinfo" may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalues, where a move assignment may be faster.
41 class Imageinfo
42 {
43 public:
44
45 /**
46 * @brief Constructs an image info.
** CID 1468073: Error handling issues (CHECKED_RETURN)
/home/gilles/Devel/7.x/core/dplugins/generic/tools/mediaserver/upnpsdk/Neptune/Source/System/Bsd/NptBsdSockets.cpp: 1022 in NPT_BsdSocketFd::Cancel(bool)()
________________________________________________________________________________________________________
*** CID 1468073: Error handling issues (CHECKED_RETURN)
/home/gilles/Devel/7.x/core/dplugins/generic/tools/mediaserver/upnpsdk/Neptune/Source/System/Bsd/NptBsdSockets.cpp: 1022 in NPT_BsdSocketFd::Cancel(bool)()
1016 }
1017 }
1018
1019 // unblock waiting selects
1020 if (m_Cancellable) {
1021 char dummy = 0;
>>> CID 1468073: Error handling issues (CHECKED_RETURN)
>>> Calling "send(this->m_CancelFds[0], &dummy, 1UL, 0)" without checking return value. This library function may fail and return an error code.
1022 send(m_CancelFds[0], &dummy, 1, 0);
1023 }
1024
1025 return NPT_SUCCESS;
1026 }
1027
** CID 1465270: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/7.x/core/utilities/queuemanager/manager/queuesettings.h: 43 in ()
________________________________________________________________________________________________________
*** CID 1465270: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/7.x/core/utilities/queuemanager/manager/queuesettings.h: 43 in ()
37 namespace Digikam
38 {
39
40 /**
41 * This container host all common settings used by a queue, not including assigned batch tools
42 */
>>> CID 1465270: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "Digikam::QueueSettings" may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalues, where a move assignment may be faster.
43 class QueueSettings
44 {
45
46 public:
47
48 enum RenamingRule
** CID 1465265: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/7.x/core/utilities/imageeditor/core/iofilesettings.h: 35 in ()
________________________________________________________________________________________________________
*** CID 1465265: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/7.x/core/utilities/imageeditor/core/iofilesettings.h: 35 in ()
29 #include "drawdecoding.h"
30 #include "digikam_export.h"
31
32 namespace Digikam
33 {
34
>>> CID 1465265: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "Digikam::IOFileSettings" may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalues, where a move assignment may be faster.
35 class DIGIKAM_EXPORT IOFileSettings
36 {
37
38 public:
39
40 IOFileSettings()
** CID 1463642: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/7.x/core/dplugins/generic/webservices/vkontakte/backend/vkontakte_albuminfo.h: 36 in ()
________________________________________________________________________________________________________
*** CID 1463642: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/7.x/core/dplugins/generic/webservices/vkontakte/backend/vkontakte_albuminfo.h: 36 in ()
30 #include <QSharedDataPointer>
31
32 namespace Vkontakte
33 {
34
35 // https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy40PWFEpS875e-2BZH2-2FpIkcrUii0JtTYPNhcXCCB5VzC1k3mE_IpEMwFcbl-2BY9RHaL2m6a3nuAxB4hfm4MTniX0gHjADXRUsdn4qr2ZaaRZo4ANfOWM9kDQSsQ-2BQw-2BnSy9Uf6I3vc0gdIgjDruQR-2B7fYsFhJNFGBTMm3pfWUJkhyKDjqgpXA4jqUKkKMz-2FrSqenSyw2Na1yPu6NVv4rUOhMlFbJ5gvc7crywSjjjIMwZWLH0daqqqrTkrUzte1CxzihJtyrQ-3D-3D
>>> CID 1463642: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "Vkontakte::AlbumInfo" may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalues, where a move assignment may be faster.
36 class AlbumInfo
37 {
38 public:
39
40 enum
41 {
** CID 1455818: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/7.x/core/libs/database/history/itemhistorygraph.h: 45 in ()
________________________________________________________________________________________________________
*** CID 1455818: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/7.x/core/libs/database/history/itemhistorygraph.h: 45 in ()
39 namespace Digikam
40 {
41
42 class ItemHistoryGraphData;
43 class DImageHistory;
44
>>> CID 1455818: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "Digikam::ItemHistoryGraph" may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalues, where a move assignment may be faster.
45 class DIGIKAM_DATABASE_EXPORT ItemHistoryGraph
46 {
47 public:
48
49 enum HistoryLoadingFlag
50 {
** CID 1455763: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/7.x/core/libs/fileactionmanager/fileactionimageinfolist.h: 103 in ()
________________________________________________________________________________________________________
*** CID 1455763: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/7.x/core/libs/fileactionmanager/fileactionimageinfolist.h: 103 in ()
97 // Disable
98 explicit FileActionProgressItemContainer(QObject*);
99 };
100
101 // -------------------------------------------------------------------------------------------------------------------
102
>>> CID 1455763: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "Digikam::FileActionItemInfoList" may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalues, where a move assignment may be faster.
103 class FileActionItemInfoList : public QList<ItemInfo>
104 {
105 public:
106
107 FileActionItemInfoList()
108 {
** CID 1406231: Error handling issues (UNCAUGHT_EXCEPT)
/home/gilles/Devel/7.x/core/app/main/main.cpp: 99 in main()
________________________________________________________________________________________________________
*** CID 1406231: Error handling issues (UNCAUGHT_EXCEPT)
/home/gilles/Devel/7.x/core/app/main/main.cpp: 99 in main()
93 # include <shellapi.h>
94 # include <objbase.h>
95 #endif
96
97 using namespace Digikam;
98
>>> CID 1406231: Error handling issues (UNCAUGHT_EXCEPT)
>>> In function "main(int, char **)" an exception of type "std::invalid_argument" is thrown and never caught.
99 int main(int argc, char* argv[])
100 {
101 SystemSettings system(QLatin1String("digikam"));
102 system.readSettings();
103
104 QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps,
** CID 1215666: Uninitialized variables (UNINIT)
________________________________________________________________________________________________________
*** CID 1215666: Uninitialized variables (UNINIT)
/home/gilles/Devel/7.x/core/dplugins/generic/tools/mediaserver/upnpsdk/Platinum/Source/Core/PltDeviceData.cpp: 68 in PLT_DeviceData::PLT_DeviceData(NPT_HttpUrl, const char *, NPT_TimeStamp, const char *, const char *)()
62 if (uuid == NULL || strlen(uuid) == 0) {
63 PLT_UPnPMessageHelper::GenerateGUID(m_UUID);
64 }
65
66 SetLeaseTime(lease_time);
67 SetURLBase(m_URLDescription);
>>> CID 1215666: Uninitialized variables (UNINIT)
>>> Using uninitialized value "this->m_ConfigId" when calling "UpdateConfigId".
68 UpdateConfigId();
69 }
70
71 /*----------------------------------------------------------------------
72 | PLT_DeviceData::~PLT_DeviceData
73 +---------------------------------------------------------------------*/
** CID 20294: Resource leaks (RESOURCE_LEAK)
/home/gilles/Devel/7.x/core/dplugins/generic/tools/panorama/panoparser/ptoparser/panoParser.y: 138 in yyparse()
________________________________________________________________________________________________________
*** CID 20294: Resource leaks (RESOURCE_LEAK)
/home/gilles/Devel/7.x/core/dplugins/generic/tools/panorama/panoparser/ptoparser/panoParser.y: 138 in yyparse()
132 char** curComment = (char**) panoScriptReAlloc((void**) &commentLines,
133 sizeof(char*),
134 &nbCommentLine);
135
136 if (curComment == NULL) {
137 yyerror("Not enough memory");
>>> CID 20294: Resource leaks (RESOURCE_LEAK)
>>> Variable "yyss" going out of scope leaks the storage it points to.
138 return -1;
139 }
140
141 *curComment = strdup($1);
142 }
143
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp2OAl-2Fauo86CB28HCT0-2BnD-2F6eFMYt863B1-2B0FLvU5y-2FRWSl8rMA4vGwCkGPp0f1hg-3DoTGN_IpEMwFcbl-2BY9RHaL2m6a3nuAxB4hfm4MTniX0gHjADXRUsdn4qr2ZaaRZo4ANfOWnn0E2q5vjojqYhEWe4TyL2alQF6xIKV-2FrgJSQmM1dc0h5r-2BxCF2N0c0EeJPHPuAcAPuybQKce-2BThNe6FjXpgXcQYX3WLn5ddrZcbUhFrSZAWhukXrkcHyOXabN9SFQQ88EVeQb7XO86H4mn3arCISQ-3D-3D
More information about the Digikam-devel
mailing list