Newly introduced findings

List of Findings

Error: COMPILER_WARNING (CWE-195): [#def1]
LibRaw-0.22.2/src/decoders/fp_dng.cpp: scope_hint: In member function 'void LibRaw::convertFloatToInt(float, float, float)'
LibRaw-0.22.2/src/decoders/fp_dng.cpp:560:24: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'INT64' {aka 'long long int'}
#  560 |   for (size_t i = 0; i < pixcnt; ++i)
#      |                      ~~^~~~~~~~
#  558|       imgdata.rawdata.color.fnorm = imgdata.color.fnorm = 0.f;
#  559|   
#  560|->   for (size_t i = 0; i < pixcnt; ++i)
#  561|     {
#  562|       float val = MAX(data[i], 0.f);

Error: COMPILER_WARNING (CWE-195): [#def2]
LibRaw-0.22.2/src/decoders/unpack_thumb.cpp: scope_hint: In member function 'int LibRaw::unpack_thumb()'
LibRaw-0.22.2/src/decoders/unpack_thumb.cpp:70:27: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'INT64' {aka 'long long int'} and 'long long unsigned int'
#   70 |     if (INT64(W)*INT64(H) > 1024ULL * 1024ULL * LIBRAW_MAX_THUMBNAIL_MB) return LIBRAW_UNSUPPORTED_THUMBNAIL; \
LibRaw-0.22.2/src/decoders/unpack_thumb.cpp:383:17: note: in expansion of macro 'THUMB_SIZE_CHECKWH'
#  383 |                 THUMB_SIZE_CHECKWH(T.twidth, (INT64(T.theight)*INT64(o_bps)));
#      |                 ^~~~~~~~~~~~~~~~~~
#   68|   #define THUMB_SIZE_CHECKWH(W,H) \

#   69|     do { \

#   70|->     if (INT64(W)*INT64(H) > 1024ULL * 1024ULL * LIBRAW_MAX_THUMBNAIL_MB) return LIBRAW_UNSUPPORTED_THUMBNAIL; \

#   71|       if (INT64(W)*INT64(H) < 64ULL)        return LIBRAW_NO_THUMBNAIL; \

#   72|     } while (0)


Error: COMPILER_WARNING (CWE-195): [#def3]
LibRaw-0.22.2/src/decoders/unpack_thumb.cpp:71:27: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'INT64' {aka 'long long int'} and 'long long unsigned int'
#   71 |     if (INT64(W)*INT64(H) < 64ULL)        return LIBRAW_NO_THUMBNAIL; \
#      |         ~~~~~~~~~~~~~~~~~~^~~~~~~
LibRaw-0.22.2/src/decoders/unpack_thumb.cpp:383:17: note: in expansion of macro 'THUMB_SIZE_CHECKWH'
#  383 |                 THUMB_SIZE_CHECKWH(T.twidth, (INT64(T.theight)*INT64(o_bps)));
#      |                 ^~~~~~~~~~~~~~~~~~
#   69|     do { \

#   70|       if (INT64(W)*INT64(H) > 1024ULL * 1024ULL * LIBRAW_MAX_THUMBNAIL_MB) return LIBRAW_UNSUPPORTED_THUMBNAIL; \

#   71|->     if (INT64(W)*INT64(H) < 64ULL)        return LIBRAW_NO_THUMBNAIL; \

#   72|     } while (0)

#   73|   


Error: COMPILER_WARNING (CWE-195): [#def4]
LibRaw-0.22.2/src/metadata/sony.cpp: scope_hint: In member function 'void LibRaw::parseSonySRF(unsigned int)'
LibRaw-0.22.2/src/metadata/sony.cpp:2339:27: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'unsigned int'
# 2339 |           if (ioffset + 3 >= len)
#      |               ~~~~~~~~~~~~^~~~~~
# 2337|   	  int ioffset = int(offset);
# 2338|   	  
# 2339|-> 	  if (ioffset + 3 >= len)
# 2340|           goto restore_after_parseSonySRF;
# 2341|         /* master key is stored in big endian */

Error: COMPILER_WARNING (CWE-457): [#def5]
LibRaw-0.22.2/src/postprocessing/postprocessing_aux.cpp: scope_hint: In member function 'LibRaw::wavelet_denoise()'
LibRaw-0.22.2/src/postprocessing/postprocessing_aux.cpp:150:32: warning[-Wmaybe-uninitialized]: 'size' may be used uninitialized
#  150 |   fimg = (float *)malloc((size * 3 + iheight + iwidth) * sizeof *fimg);
#      |                           ~~~~~^~~
LibRaw-0.22.2/src/postprocessing/postprocessing_aux.cpp:135:18: note: 'size' was declared here
#  135 |   int scale = 1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2];
#      |                  ^~~~
#  148|     black <<= scale;
#  149|     FORC4 cblack[c] <<= scale;
#  150|->   fimg = (float *)malloc((size * 3 + iheight + iwidth) * sizeof *fimg);
#  151|     temp = fimg + size * 3;
#  152|     if ((nc = colors) == 3 && filters)

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.97.1
diffbase-analyzer-version-cppcheck2.21.1
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-117.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameLibRaw-0.22.1-1.fc44
diffbase-store-results-to/tmp/tmpgqt5ovp7/LibRaw-0.22.1-1.fc44.tar.xz
diffbase-time-created2026-08-03 13:06:54
diffbase-time-finished2026-08-03 13:10:32
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpgqt5ovp7/LibRaw-0.22.1-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpgqt5ovp7/LibRaw-0.22.1-1.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.7.HEAD-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-117.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameLibRaw-0.22.2-1.fc45
store-results-to/tmp/tmp2jb0qcf2/LibRaw-0.22.2-1.fc45.tar.xz
time-created2026-08-03 13:10:40
time-finished2026-08-03 13:13:30
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmp2jb0qcf2/LibRaw-0.22.2-1.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp2jb0qcf2/LibRaw-0.22.2-1.fc45.src.rpm'
tool-versioncsmock-3.8.7.HEAD-1.el9