New Defects reported by Coverity Scan for digiKam
scan-admin at coverity.com
scan-admin at coverity.com
Fri Aug 27 11:30:31 BST 2021
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.
116 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 1490807: Error handling issues (CHECKED_RETURN)
/mnt/devel/GIT/7.x/core/tests/geolocation/geoiface/itemmarkertiler_utest.cpp: 782 in TestItemMarkerTiler::benchmarkIteratorWholeWorld()()
________________________________________________________________________________________________________
*** CID 1490807: Error handling issues (CHECKED_RETURN)
/mnt/devel/GIT/7.x/core/tests/geolocation/geoiface/itemmarkertiler_utest.cpp: 782 in TestItemMarkerTiler::benchmarkIteratorWholeWorld()()
776 {
777 const int l=maxLevel;
778 // for (int l = 0; l <= maxLevel; ++l)
779 {
780 // iterate over the whole world:
781 ItemMarkerTiler::NonEmptyIterator it(&mm, l);
>>> CID 1490807: Error handling issues (CHECKED_RETURN)
>>> Calling "CountMarkersInIterator" without checking return value (as is done elsewhere 14 out of 17 times).
782 CountMarkersInIterator(&it);
783 }
784 }
785 }
786 #endif
787 }
788
** CID 1490806: (TAINTED_SCALAR)
/mnt/devel/GIT/7.x/core/libs/rawengine/libraw/samples/rawtextdump.cpp: 98 in main()
/mnt/devel/GIT/7.x/core/libs/rawengine/libraw/samples/rawtextdump.cpp: 137 in main()
/mnt/devel/GIT/7.x/core/libs/rawengine/libraw/samples/rawtextdump.cpp: 114 in main()
/mnt/devel/GIT/7.x/core/libs/rawengine/libraw/samples/rawtextdump.cpp: 126 in main()
________________________________________________________________________________________________________
*** CID 1490806: (TAINTED_SCALAR)
/mnt/devel/GIT/7.x/core/libs/rawengine/libraw/samples/rawtextdump.cpp: 98 in main()
92 exit(1);
93 }
94 lr.adjust_blacklevel();
95 printf("%s\t%d-%d-%dx%d\tchannel: %d\n", av[1], colstart, rowstart, width, height, channel);
96
97 printf("%6s", "R\\C");
>>> CID 1490806: (TAINTED_SCALAR)
>>> Using tainted variable "colstart + width" as a loop boundary.
98 for (int col = colstart; col < colstart + width && col < lr.imgdata.sizes.raw_width; col++)
99 printf("%6u", col);
100 printf("\n");
101
102 if (lr.imgdata.rawdata.raw_image)
103 {
/mnt/devel/GIT/7.x/core/libs/rawengine/libraw/samples/rawtextdump.cpp: 137 in main()
131 else if (lr.imgdata.rawdata.color3_image && channel < 3)
132 {
133 for (int row = rowstart; row < rowstart + height && row < lr.imgdata.sizes.raw_height; row++)
134 {
135 unsigned short(*rowdata)[3] = &lr.imgdata.rawdata.color3_image[row * lr.imgdata.sizes.raw_pitch / 6];
136 printf("%6u", row);
>>> CID 1490806: (TAINTED_SCALAR)
>>> Using tainted variable "colstart + width" as a loop boundary.
137 for (int col = colstart; col < colstart + width && col < lr.imgdata.sizes.raw_width; col++)
138 printf("%6u", subtract_bl(rowdata[col][channel],lr.imgdata.color.cblack[channel]));
139 printf("\n");
140 }
141 }
142 else
143 printf("Unsupported file data (e.g. floating point format), or incorrect channel specified\n");
/mnt/devel/GIT/7.x/core/libs/rawengine/libraw/samples/rawtextdump.cpp: 114 in main()
108 for (int c = 0; c < 48; c++)
109 rcolors[c] = lr.COLOR(row, c);
110 else
111 memset(rcolors, 0, sizeof(rcolors));
112 unsigned short *rowdata = &lr.imgdata.rawdata.raw_image[row * lr.imgdata.sizes.raw_pitch / 2];
113 printf("%6u", row);
>>> CID 1490806: (TAINTED_SCALAR)
>>> Using tainted variable "colstart + width" as a loop boundary.
114 for (int col = colstart; col < colstart + width && col < lr.imgdata.sizes.raw_width; col++)
115 if (rcolors[col % 48] == (unsigned)channel) printf("%6u", subtract_bl(rowdata[col],lr.imgdata.color.cblack[channel]));
116 else printf(" -");
117 printf("\n");
118 }
119 }
/mnt/devel/GIT/7.x/core/libs/rawengine/libraw/samples/rawtextdump.cpp: 126 in main()
120 else if (lr.imgdata.rawdata.color4_image && channel < 4)
121 {
122 for (int row = rowstart; row < rowstart + height && row < lr.imgdata.sizes.raw_height; row++)
123 {
124 unsigned short(*rowdata)[4] = &lr.imgdata.rawdata.color4_image[row * lr.imgdata.sizes.raw_pitch / 8];
125 printf("%6u", row);
>>> CID 1490806: (TAINTED_SCALAR)
>>> Using tainted variable "colstart + width" as a loop boundary.
126 for (int col = colstart; col < colstart + width && col < lr.imgdata.sizes.raw_width; col++)
127 printf("%6u", subtract_bl(rowdata[col][channel],lr.imgdata.color.cblack[channel]));
128 printf("\n");
129 }
130 }
131 else if (lr.imgdata.rawdata.color3_image && channel < 3)
** CID 1336084: Incorrect expression (USELESS_CALL)
________________________________________________________________________________________________________
*** CID 1336084: Incorrect expression (USELESS_CALL)
/usr/include/qt5/QtCore/qvector.h: 930 in QVector<int>::erase(QTypedArrayData<int>::iterator, QTypedArrayData<int>::iterator)()
924 aend = abegin + itemsToErase;
925 if (!QTypeInfoQuery<T>::isRelocatable) {
926 iterator moveBegin = abegin + itemsToErase;
927 iterator moveEnd = d->end();
928 while (moveBegin != moveEnd) {
929 if (QTypeInfo<T>::isComplex)
>>> CID 1336084: Incorrect expression (USELESS_CALL)
>>> Calling "abegin.operator int *()" is only useful for its return value, which is ignored.
930 static_cast<T *>(abegin)->~T();
931 new (abegin++) T(*moveBegin++);
932 }
933 if (abegin < d->end()) {
934 // destroy rest of instances
935 destruct(abegin, d->end());
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp2OAl-2Fauo86CB28HCT0-2BnD-2F6eFMYt863B1-2B0FLvU5y-2FRWSl8rMA4vGwCkGPp0f1hg-3Dca72_IpEMwFcbl-2BY9RHaL2m6a3nuAxB4hfm4MTniX0gHjADV1wku3d5J6JOzTI2EYfgICY-2FZvrEuSiQwwqEVD2584RnjJe9aYPKdNT2DVrjaMbUmBP42bDduuhLRJgKyP96TvAyq61lbDiAI-2BxtPX82VTYcB8lTjbrBrahIPkADlzFFxVZy0PXfEc-2BX8M46JM6mpunTkTl2aIwh0mI-2F7FGkj5ew-3D-3D
More information about the Digikam-devel
mailing list