<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>New Defects Reported - digiKam</title>
  <style>
    body { font-family: Arial, sans-serif; color: #222; line-height: 1.6; }
    .button {
      display: inline-block;
      padding: 10px 20px;
      margin: 20px 0;
      font-size: 16px;
      color: #fff !important;
      background-color: #0056b3;
      text-decoration: none;
      border-radius: 5px;
    }
    pre {
      background: #f8f9fa;
      padding: 10px;
      border-radius: 5px;
      font-size: 14px;
      overflow-x: auto;
    }
  </style>
</head>
<body>
  <p>Hi,</p>

  <p>
    Please find the latest report on new defect(s) introduced to <strong>digiKam</strong>
     found with Coverity Scan.
  </p>  

  <ul>
    <li><strong>New Defects Found:</strong> 10</li>
      <li>
        2 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
      </li>
    <li><strong>Defects Shown:</strong> Showing 10 of 10 defect(s)</li>
  </ul>

  <h3>Defect Details</h3>
  <pre>
** CID 1680465:       Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)


_____________________________________________________________________________________________
*** CID 1680465:         Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/devel/GIT/8.x/core/libs/properties/itempropertiessidebardb.cpp: 916             in Digikam::ItemPropertiesSideBarDB::setImageSelectionPropertiesInformation()()
910         // -- Total Album Items Properties
911     
912         d->selectionPropertiesTab->setTotalCount(d->allInfos.count());
913     
914         qint64 totalFileSize           = selectionFileSize;
915         ItemInfoList totalGroups       = selectionGroups;
>>>     CID 1680465:         Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "selectionMimes" is copied in call to copy constructor for class "QHash<QString, int>", when it could be moved instead.
916         QHash<QString, int> totalMimes = selectionMimes;
917     
918         for (const ItemInfo& info : std::as_const(restInfos))
919         {
920             // cppcheck-suppress useStlAlgorithm
921             totalFileSize += info.fileSize();

** CID 1680464:       Null pointer dereferences  (FORWARD_NULL)


_____________________________________________________________________________________________
*** CID 1680464:         Null pointer dereferences  (FORWARD_NULL)
/home/gilles/devel/GIT/8.x/core/utilities/facemanagement/pipelines/edit/facepipelineedit.cpp: 143             in Digikam::FacePipelineEdit::removeAllFaces(const Digikam::ItemInfo &)()
137     
138         ++totalItemCount;
139     
140         Q_EMIT scheduled();
141         Q_EMIT started(i18n("Remove all faces"));
142     
>>>     CID 1680464:         Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "nextQueue" to "size", which dereferences it.
143         emitSignalUpdateItemCount(nextQueue->size()+1);
144     
145         enqueue(nextQueue, package);
146     }
147     
148     FaceTagsIface FacePipelineEdit::editTag(const ItemInfo& info,

** CID 1680463:       Incorrect expression  (IDENTICAL_BRANCHES)
/home/gilles/devel/GIT/8.x/core/libs/rawengine/libraw/src/decoders/decoders_libraw_dcrdefs.cpp: 20           in LibRaw::nikon_he_load_raw()()


_____________________________________________________________________________________________
*** CID 1680463:         Incorrect expression  (IDENTICAL_BRANCHES)
/home/gilles/devel/GIT/8.x/core/libs/rawengine/libraw/src/decoders/decoders_libraw_dcrdefs.cpp: 20             in LibRaw::nikon_he_load_raw()()
14     
15     #include "../../internal/dcraw_defs.h"
16     
17     
18     void LibRaw::nikon_he_load_raw()
19     {
>>>     CID 1680463:         Incorrect expression  (IDENTICAL_BRANCHES)
>>>     The same code is executed when the condition "this->imgdata.idata.dng_version" 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?
20         if(dng_version)
21              throw LIBRAW_EXCEPTION_UNSUPPORTED_FORMAT; // Never reached
22         throw LIBRAW_EXCEPTION_UNSUPPORTED_FORMAT;
23     }
24     
25     void LibRaw::packed_tiled_dng_load_raw()

** CID 1680461:       Null pointer dereferences  (FORWARD_NULL)


_____________________________________________________________________________________________
*** CID 1680461:         Null pointer dereferences  (FORWARD_NULL)
/home/gilles/devel/GIT/8.x/core/utilities/facemanagement/pipelines/edit/facepipelineedit.cpp: 102             in Digikam::FacePipelineEdit::confirmFace(const Digikam::ItemInfo &, const Digikam::FaceTagsIface &, const Digikam::TagRegion &, int, bool)()
96                                                                              retrain);
97     
98         ++totalItemCount;
99         Q_EMIT scheduled();
100         Q_EMIT started(i18n("Confirming face"));
101     
>>>     CID 1680461:         Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "nextQueue" to "size", which dereferences it.
102         emitSignalUpdateItemCount(nextQueue->size()+1);
103     
104         enqueue(nextQueue, package);
105     
106         return (FaceTagsEditor::confirmedEntry(newFace, tagId, region));
107     }

** CID 1680460:       Null pointer dereferences  (FORWARD_NULL)


_____________________________________________________________________________________________
*** CID 1680460:         Null pointer dereferences  (FORWARD_NULL)
/home/gilles/devel/GIT/8.x/core/utilities/facemanagement/pipelines/edit/facepipelineedit.cpp: 273             in Digikam::FacePipelineEdit::deleteRejectedFaceTagList(const Digikam::FaceTagsIface &)()
267     
268         ++totalItemCount;
269     
270         Q_EMIT scheduled();
271         Q_EMIT started(i18n("Clearing rejected face tag list."));
272     
>>>     CID 1680460:         Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "nextQueue" to "size", which dereferences it.
273         emitSignalUpdateItemCount(nextQueue->size()+1);
274     
275         enqueue(nextQueue, package);
276     
277         return newFace;
278     }

** CID 1680459:       Null pointer dereferences  (FORWARD_NULL)


_____________________________________________________________________________________________
*** CID 1680459:         Null pointer dereferences  (FORWARD_NULL)
/home/gilles/devel/GIT/8.x/core/utilities/facemanagement/pipelines/edit/facepipelineedit.cpp: 235             in Digikam::FacePipelineEdit::addManually(const Digikam::ItemInfo &, const Digikam::DImg &, const Digikam::TagRegion &, bool)()
229     
230         ++totalItemCount;
231     
232         Q_EMIT scheduled();
233         Q_EMIT started(i18n("Manually adding face"));
234     
>>>     CID 1680459:         Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "nextQueue" to "size", which dereferences it.
235         emitSignalUpdateItemCount(nextQueue->size()+1);
236     
237         enqueue(nextQueue, package);
238     
239         return newFace;
240     }

** CID 1680458:       Null pointer dereferences  (FORWARD_NULL)


_____________________________________________________________________________________________
*** CID 1680458:         Null pointer dereferences  (FORWARD_NULL)
/home/gilles/devel/GIT/8.x/core/utilities/facemanagement/pipelines/edit/facepipelineedit.cpp: 167             in Digikam::FacePipelineEdit::editTag(const Digikam::ItemInfo &, const Digikam::FaceTagsIface &, int)()
161     
162         ++totalItemCount;
163     
164         Q_EMIT scheduled();
165         Q_EMIT started(i18n("Editing face tag"));
166     
>>>     CID 1680458:         Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "nextQueue" to "size", which dereferences it.
167         emitSignalUpdateItemCount(nextQueue->size()+1);
168     
169         enqueue(nextQueue, package);
170     
171         // FaceTagsIface newFace(package->face);
172         newFace.setTagId(newTagId);

** CID 1680457:       Incorrect expression  (EVALUATION_ORDER)
/home/gilles/devel/GIT/8.x/core/libs/rawengine/libraw/src/decoders/olympus14.cpp: 287           in LibRaw::olympus_load_raw()()


_____________________________________________________________________________________________
*** CID 1680457:         Incorrect expression  (EVALUATION_ORDER)
/home/gilles/devel/GIT/8.x/core/libs/rawengine/libraw/src/decoders/olympus14.cpp: 287             in LibRaw::olympus_load_raw()()
281                 vbits = 0;
282     
283                       pred1 = context[0];
284                       context[0] = (tag0x644 == 15) ? 0 : vbits >> tag0x644;
285               int32_t W = col < 2 ? tag0x642 : context[1];
286               int32_t N = row < 2 ? tag0x642 : raw_image[(row - 2) * raw_width + col] >> tag0x640;
>>>     CID 1680457:         Incorrect expression  (EVALUATION_ORDER)
>>>     In "NW = ((row < 2U || col < 2U) ? tag0x642 : (NW = raw_image[(row - 2U) * raw_width + col - 2U] >> tag0x640))", "NW" is written twice with the same value.
287               int32_t NW = (row < 2 || col < 2)? tag0x642 : NW = raw_image[(row - 2) * raw_width + col - 2] >> tag0x640;
288     
289                       context[1] = lpred;
290               if ((W < N) || (NW < W))
291                       {
292                               if (NW <= N && W >= N)

** CID 1680456:       Null pointer dereferences  (FORWARD_NULL)


_____________________________________________________________________________________________
*** CID 1680456:         Null pointer dereferences  (FORWARD_NULL)
/home/gilles/devel/GIT/8.x/core/utilities/facemanagement/pipelines/edit/facepipelineedit.cpp: 127             in Digikam::FacePipelineEdit::removeFace(const Digikam::ItemInfo &, const Digikam::FaceTagsIface &)()
121     
122         ++totalItemCount;
123     
124         Q_EMIT scheduled();
125         Q_EMIT started(i18n("Removing face"));
126     
>>>     CID 1680456:         Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "nextQueue" to "size", which dereferences it.
127         emitSignalUpdateItemCount(nextQueue->size()+1);
128     
129         enqueue(nextQueue, package);
130     }
131     
132     void FacePipelineEdit::removeAllFaces(const ItemInfo& info)

** CID 1680455:       Null pointer dereferences  (FORWARD_NULL)


_____________________________________________________________________________________________
*** CID 1680455:         Null pointer dereferences  (FORWARD_NULL)
/home/gilles/devel/GIT/8.x/core/utilities/facemanagement/pipelines/edit/facepipelineedit.cpp: 198             in Digikam::FacePipelineEdit::editRegion(const Digikam::ItemInfo &, const Digikam::FaceTagsIface &, const Digikam::TagRegion &, int, bool)()
192     
193         ++totalItemCount;
194     
195         Q_EMIT scheduled();
196         Q_EMIT started(i18n("Editing face region"));
197     
>>>     CID 1680455:         Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "nextQueue" to "size", which dereferences it.
198         emitSignalUpdateItemCount(nextQueue->size()+1);
199     
200         enqueue(nextQueue, package);
201     
202         newFace.setRegion(region);
203     

  </pre>

  <p>
    <a href="https://scan.coverity.com/projects/digikam?tab=overview" class="button">View Defects in Coverity Scan</a>
  </p>

  <p>Best regards,</p>
  <p>The Coverity Scan Admin Team</p>
  <img class="logo" width="140" src="https://scan.coverity.com/assets/BlackDuckLogo-6697adc63e07340464201a2ad534d3d3e44f95d36edda20b140440d34f05372f.svg" />
</body>
</html>