New Defects reported by Coverity Scan for digiKam
scan-admin at coverity.com
scan-admin at coverity.com
Mon Jan 20 16:15:33 GMT 2025
Hi,
Please find the latest report on new defect(s) introduced to digiKam found with Coverity Scan.
6 new defect(s) introduced to digiKam found with Coverity Scan.
8 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 6 of 6 defect(s)
** CID 1641351: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1641351: Null pointer dereferences (FORWARD_NULL)
/home/gilles/devel/8.x/core/libs/progressmanager/statusbarprogresswidget.cpp: 388 in Digikam::StatusbarProgressWidget::eventFilter(QObject *, QEvent *)()
382 bool StatusbarProgressWidget::eventFilter(QObject*, QEvent* ev)
383 {
384 if (ev->type() == QEvent::MouseButtonPress)
385 {
386 QMouseEvent* const e = dynamic_cast<QMouseEvent*>(ev);
387
>>> CID 1641351: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "e" to "button", which dereferences it.
388 if ((e->button() == Qt::LeftButton) && (d->mode != Private::None))
389 {
390 // toggle view on left mouse button
391 // Consensus seems to be that we should show/hide the fancy dialog when the user
392 // clicks anywhere in the small one.
393
** CID 1641350: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1641350: Null pointer dereferences (FORWARD_NULL)
/home/gilles/devel/8.x/core/dplugins/generic/tools/printcreator/wizard/advprintwizard.cpp: 371 in DigikamGenericPrintCreatorPlugin::AdvPrintWizard::eventFilter(QObject *, QEvent *)()
365 bool AdvPrintWizard::eventFilter(QObject* o, QEvent* e)
366 {
367 if (e && (e->type() == QEvent::KeyRelease))
368 {
369 QKeyEvent* const k = dynamic_cast<QKeyEvent*>(e);
370
>>> CID 1641350: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "k" to "key", which dereferences it.
371 if (
372 (k->key() == Qt::Key_PageUp) ||
373 (k->key() == Qt::Key_PageDown) ||
374 (k->key() == Qt::Key_Up) ||
375 (k->key() == Qt::Key_Down)
376 )
** CID 1641349: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1641349: Null pointer dereferences (FORWARD_NULL)
/home/gilles/devel/8.x/core/app/date/ddateedit.cpp: 388 in Digikam::DDateEdit::eventFilter(QObject *, QEvent *)()
382 else if (event->type() == QEvent::KeyPress)
383 {
384 // Up and down arrow keys step the date
385
386 QKeyEvent* const keyEvent = dynamic_cast<QKeyEvent*>(event);
387
>>> CID 1641349: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "keyEvent" to "key", which dereferences it.
388 if (keyEvent->key() == Qt::Key_Return)
389 {
390 lineEnterPressed();
391 return true;
392 }
393
** CID 1641348: Control flow issues (DEADCODE)
/home/gilles/devel/8.x/core/dplugins/generic/view/presentation/audio/presentation_audiopage.cpp: 432 in DigikamGenericPresentationPlugin::PresentationAudioPage::slotSoundFilesButtonUp()()
________________________________________________________________________________________________________
*** CID 1641348: Control flow issues (DEADCODE)
/home/gilles/devel/8.x/core/dplugins/generic/view/presentation/audio/presentation_audiopage.cpp: 432 in DigikamGenericPresentationPlugin::PresentationAudioPage::slotSoundFilesButtonUp()()
426 {
427 return;
428 }
429
430 PresentationAudioListItem* const pitem = static_cast<PresentationAudioListItem*>(m_SoundFilesListBox->takeItem(index));
431
>>> CID 1641348: Control flow issues (DEADCODE)
>>> Execution cannot reach the expression "index" inside this statement: "this->m_SoundFilesListBox->...".
432 m_SoundFilesListBox->insertItem(((index > 0) ? index - 1 : index), pitem);
433 m_SoundFilesListBox->setCurrentItem(pitem);
434
435 updateFileList();
436 }
437
** CID 1641347: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1641347: Null pointer dereferences (FORWARD_NULL)
/home/gilles/devel/8.x/core/app/date/ddatepicker.cpp: 203 in Digikam::DDatePicker::eventFilter(QObject *, QEvent *)()
197 bool DDatePicker::eventFilter(QObject* o, QEvent* e)
198 {
199 if (e->type() == QEvent::KeyPress)
200 {
201 QKeyEvent* const k = dynamic_cast<QKeyEvent*>(e);
202
>>> CID 1641347: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "k" to "key", which dereferences it.
203 if (
204 (k->key() == Qt::Key_PageUp) ||
205 (k->key() == Qt::Key_PageDown) ||
206 (k->key() == Qt::Key_Up) ||
207 (k->key() == Qt::Key_Down)
208 )
** CID 1641346: (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1641346: (FORWARD_NULL)
/home/gilles/devel/8.x/core/dplugins/generic/metadata/metadataedit/dialog/metadataeditdialog.cpp: 356 in DigikamGenericMetadataEditPlugin::MetadataEditDialog::eventFilter(QObject *, QEvent *)()
350 {
351 slotNext();
352 }
353
354 return true;
355 }
>>> CID 1641346: (FORWARD_NULL)
>>> Passing null pointer "k" to "key", which dereferences it.
356 else if (
357 (k->modifiers() == Qt::ShiftModifier) &&
358 ((k->key() == Qt::Key_Enter) || (k->key() == Qt::Key_Return))
359 )
360 {
361 slotApply();
/home/gilles/devel/8.x/core/dplugins/generic/metadata/metadataedit/dialog/metadataeditdialog.cpp: 342 in DigikamGenericMetadataEditPlugin::MetadataEditDialog::eventFilter(QObject *, QEvent *)()
336 bool MetadataEditDialog::eventFilter(QObject*, QEvent* e)
337 {
338 if (e->type() == QEvent::KeyPress)
339 {
340 QKeyEvent* const k = dynamic_cast<QKeyEvent*>(e);
341
>>> CID 1641346: (FORWARD_NULL)
>>> Passing null pointer "k" to "key", which dereferences it.
342 if (
343 (k->modifiers() == Qt::ControlModifier) &&
344 ((k->key() == Qt::Key_Enter) || (k->key() == Qt::Key_Return))
345 )
346 {
347 slotApply();
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/digikam?tab=overview
More information about the Digikam-devel
mailing list