Hi, Please find the latest report on new defect(s) introduced to digiKam found with Coverity Scan. 11 new defect(s) introduced to digiKam found with Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 11 of 11 defect(s) ** CID 1405887: Uninitialized members (UNINIT_CTOR) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/generator/imageelement.cpp: 46 in Digikam::ImageElement::ImageElement()() ________________________________________________________________________________________________________ *** CID 1405887: Uninitialized members (UNINIT_CTOR) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/generator/imageelement.cpp: 46 in Digikam::ImageElement::ImageElement()() 40 { 41 } 42 43 ImageElement::ImageElement() 44 : mValid(false) 45 { >>> CID 1405887: Uninitialized members (UNINIT_CTOR) >>> Non-static class member "mOrientation" is not initialized in this constructor nor in any functions that it calls. 46 } 47 48 ImageElement::~ImageElement() 49 { 50 } 51 ** CID 1405886: Resource leaks (RESOURCE_LEAK) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/generator/gallerytheme.cpp: 216 in Digikam::GalleryTheme::getList()() ________________________________________________________________________________________________________ *** CID 1405886: Resource leaks (RESOURCE_LEAK) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/generator/gallerytheme.cpp: 216 in Digikam::GalleryTheme::getList()() 210 211 if (!internalNameList.contains(internalName)) 212 { 213 sList << GalleryTheme::Ptr(theme); 214 internalNameList << internalName; 215 } >>> CID 1405886: Resource leaks (RESOURCE_LEAK) >>> Variable "theme" going out of scope leaks the storage it points to. 216 } 217 } 218 219 return sList; 220 } 221 ** CID 1405885: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmlwizard.cpp: 181 in Digikam::HTMLWizard::theme() const() ________________________________________________________________________________________________________ *** CID 1405885: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmlwizard.cpp: 181 in Digikam::HTMLWizard::theme() const() 175 { 176 return d->mInfo; 177 } 178 179 GalleryTheme::Ptr HTMLWizard::theme() const 180 { >>> CID 1405885: Null pointer dereferences (FORWARD_NULL) >>> Dynamic cast to pointer "dynamic_cast <Digikam::ThemeListBoxItem *>(this->d->mThemePage->mThemeList->currentItem())" can return "NULL". 181 return (dynamic_cast<ThemeListBoxItem*>(d->mThemePage->mThemeList->currentItem())->mTheme); 182 } 183 184 QWidget* HTMLWizard::parametersWidget(const QByteArray& iname) const 185 { 186 return d->mParametersPage->mThemeParameterWidgetFromName[iname]; ** CID 1405884: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmlfinalpage.cpp: 79 in Digikam::HTMLFinalPage::slotProcess()() ________________________________________________________________________________________________________ *** CID 1405884: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmlfinalpage.cpp: 79 in Digikam::HTMLFinalPage::slotProcess()() 73 { 74 QTimer::singleShot(0, this, SLOT(slotProcess())); 75 } 76 77 void HTMLFinalPage::slotProcess() 78 { >>> CID 1405884: Null pointer dereferences (FORWARD_NULL) >>> Assigning: "wizard" = "dynamic_cast <Digikam::HTMLWizard *>(this->assistant())". 79 HTMLWizard* const wizard = dynamic_cast<HTMLWizard*>(assistant()); 80 GalleryInfo* const info = wizard->galleryInfo(); 81 GalleryTheme::Ptr theme = wizard->theme(); 82 QString themeInternalName = theme->internalName(); 83 info->setTheme(themeInternalName); 84 ** CID 1405883: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmloutputpage.cpp: 99 in Digikam::HTMLOutputPage::initializePage()() ________________________________________________________________________________________________________ *** CID 1405883: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmloutputpage.cpp: 99 in Digikam::HTMLOutputPage::initializePage()() 93 HTMLOutputPage::~HTMLOutputPage() 94 { 95 } 96 97 void HTMLOutputPage::initializePage() 98 { >>> CID 1405883: Null pointer dereferences (FORWARD_NULL) >>> Assigning: "wizard" = "dynamic_cast <Digikam::HTMLWizard *>(this->assistant())". 99 HTMLWizard* const wizard = dynamic_cast<HTMLWizard*>(assistant()); 100 GalleryInfo* const info = wizard->galleryInfo(); 101 102 mKcfg_destUrl->setFileDlgPath(info->destUrl().toLocalFile()); 103 mKcfg_openInBrowser->setChecked(info->openInBrowser()); 104 } ** CID 1405882: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmlalbumselectorpage.cpp: 53 in Digikam::HTMLAlbumSelectorPage::validatePage()() ________________________________________________________________________________________________________ *** CID 1405882: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmlalbumselectorpage.cpp: 53 in Digikam::HTMLAlbumSelectorPage::validatePage()() 47 48 bool HTMLAlbumSelectorPage::validatePage() 49 { 50 if (mCollectionSelector->selectedAlbums().empty()) 51 return false; 52 >>> CID 1405882: Null pointer dereferences (FORWARD_NULL) >>> Assigning: "wizard" = "dynamic_cast <Digikam::HTMLWizard *>(this->assistant())". 53 HTMLWizard* const wizard = dynamic_cast<HTMLWizard*>(assistant()); 54 GalleryInfo* const info = wizard->galleryInfo(); 55 info->mCollectionList = mCollectionSelector->selectedAlbums(); 56 57 return true; 58 } 59 ** CID 1405881: (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmlthemepage.cpp: 107 in Digikam::HTMLThemePage::nextId() const() /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmlthemepage.cpp: 111 in Digikam::HTMLThemePage::nextId() const() ________________________________________________________________________________________________________ *** CID 1405881: (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmlthemepage.cpp: 107 in Digikam::HTMLThemePage::nextId() const() 101 GalleryTheme::Ptr theme = static_cast<ThemeListBoxItem*>(mThemeList->currentItem())->mTheme; 102 103 // Enable theme parameter page as next page if there is any parameter 104 105 if (theme->parameterList().size() > 0) 106 { >>> CID 1405881: (FORWARD_NULL) >>> Dynamic cast to pointer "dynamic_cast <Digikam::HTMLWizard *>(this->assistant())" can return "NULL". 107 return dynamic_cast<HTMLWizard*>(assistant())->parametersPageId(); 108 } 109 } 110 111 return dynamic_cast<HTMLWizard*>(assistant())->imageSettingsPageId(); 112 } 113 /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmlthemepage.cpp: 111 in Digikam::HTMLThemePage::nextId() const() 105 if (theme->parameterList().size() > 0) 106 { 107 return dynamic_cast<HTMLWizard*>(assistant())->parametersPageId(); 108 } 109 } 110 >>> CID 1405881: (FORWARD_NULL) >>> Dynamic cast to pointer "dynamic_cast <Digikam::HTMLWizard *>(this->assistant())" can return "NULL". 111 return dynamic_cast<HTMLWizard*>(assistant())->imageSettingsPageId(); 112 } 113 ** CID 1405880: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmlthemepage.cpp: 69 in Digikam::HTMLThemePage::initializePage()() ________________________________________________________________________________________________________ *** CID 1405880: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmlthemepage.cpp: 69 in Digikam::HTMLThemePage::initializePage()() 63 HTMLThemePage::~HTMLThemePage() 64 { 65 } 66 67 void HTMLThemePage::initializePage() 68 { >>> CID 1405880: Null pointer dereferences (FORWARD_NULL) >>> Assigning: "wizard" = "dynamic_cast <Digikam::HTMLWizard *>(this->assistant())". 69 HTMLWizard* const wizard = dynamic_cast<HTMLWizard*>(assistant()); 70 GalleryInfo* const info = wizard->galleryInfo(); 71 GalleryTheme::List list = GalleryTheme::getList(); 72 GalleryTheme::List::ConstIterator it = list.constBegin(); 73 GalleryTheme::List::ConstIterator end = list.constEnd(); 74 ** CID 1405879: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmloutputpage.cpp: 111 in Digikam::HTMLOutputPage::validatePage()() ________________________________________________________________________________________________________ *** CID 1405879: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/wizard/htmloutputpage.cpp: 111 in Digikam::HTMLOutputPage::validatePage()() 105 106 bool HTMLOutputPage::validatePage() 107 { 108 if (mKcfg_destUrl->fileDlgPath().isEmpty()) 109 return false; 110 >>> CID 1405879: Null pointer dereferences (FORWARD_NULL) >>> Assigning: "wizard" = "dynamic_cast <Digikam::HTMLWizard *>(this->assistant())". 111 HTMLWizard* const wizard = dynamic_cast<HTMLWizard*>(assistant()); 112 GalleryInfo* const info = wizard->galleryInfo(); 113 114 info->setDestUrl(QUrl::fromLocalFile(mKcfg_destUrl->fileDlgPath())); 115 info->setOpenInBrowser(mKcfg_openInBrowser->isChecked()); 116 117 return true; 118 } 119 ** CID 1405878: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/generator/gallerygenerator.cpp: 203 in Digikam::GalleryGenerator::Private::generateImagesAndXML()() ________________________________________________________________________________________________________ *** CID 1405878: Null pointer dereferences (FORWARD_NULL) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/generator/gallerygenerator.cpp: 203 in Digikam::GalleryGenerator::Private::generateImagesAndXML()() 197 return false; 198 } 199 200 XMLElement collectionX(xmlWriter, QLatin1String("collection")); 201 xmlWriter.writeElement("name", collection->title()); 202 xmlWriter.writeElement("fileName", collectionFileName); >>> CID 1405878: Null pointer dereferences (FORWARD_NULL) >>> Dynamic cast to pointer "dynamic_cast <Digikam::PAlbum *>(collection)" can return "NULL". 203 xmlWriter.writeElement("comment", (collection->type() == Album::PHYSICAL) ? 204 dynamic_cast<PAlbum*>(collection)->caption() : QString()); 205 206 // Gather image element list 207 QList<QUrl> imageList; 208 ** CID 1405877: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/generator/imagegenerationfunctor.cpp: 132 in Digikam::ImageGenerationFunctor::operator ()(Digikam::ImageElement &)() ________________________________________________________________________________________________________ *** CID 1405877: Error handling issues (CHECKED_RETURN) /home/gilles/Devel/5.x/core/utilities/assistants/htmlgallery/generator/imagegenerationfunctor.cpp: 132 in Digikam::ImageGenerationFunctor::operator ()(Digikam::ImageElement &)() 126 { 127 emitWarning(i18n("Format of image '%1' is unknown", path)); 128 return; 129 } 130 131 imageFile.close(); >>> CID 1405877: Error handling issues (CHECKED_RETURN) >>> Calling "open" without checking return value (as is done elsewhere 110 out of 112 times). 132 imageFile.open(QIODevice::ReadOnly); 133 134 imageData = imageFile.readAll(); 135 136 if (!originalImage.loadFromData(imageData) ) 137 { ________________________________________________________________________________________________________ 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-2BzKk1Nu56XtBupWJitvnTBOe-2BDyY8o-2FyBDIoI2tv5a12Tomue46xEf2cbn8wBjfEqDVYYVvF79m2tVcg2qvLE5sDlg-2FuGX4QVaofARvIBToQMY4M6R63GEJOjpIjsGPhqOYnWtb50mqITswdOkICNsv-2FBatKbjrV0IqsvCFyg-2BR4nLbScloCf8tzdASAfS8LdJ0N-2BA-2B6RRjRjZVGsf3wsw-3D To manage Coverity Scan email notifications for "[hidden email]", 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-2BzKk1Nu56XtBupWJitvnTBOe-2BDyY8o-2FyBDIoI2tv5a1lClQLYvhTA6hIHK4RRpXj0mGTSuAJ7-2FmLqet1n-2B089TdIVNevynSDSUBBGmraIIE8P6srpUNordI1a-2ByiaQHjE8ixwFSQSpsA5bKga79tcS5wHi-2B-2FSr5IHogD2iI5-2FOWO9SA9Q5Gce57Ban7e4OSgrNCkCbnh-2FCV48duDcrTbU4-3D |
Free forum by Nabble | Edit this page |