LibRaw-0.21.4-1.fc43
List of Findings
Error: COMPILER_WARNING (CWE-195): [#def1]
LibRaw-0.21.4/src/decoders/dng.cpp: scope_hint: In member function 'void LibRaw::lossy_dng_load_raw()'
LibRaw-0.21.4/internal/defines.h:100:33: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'unsigned int' and 'int'
LibRaw-0.21.4/src/decoders/dng.cpp:268:11: note: in expansion of macro 'FORC'
Error: COMPILER_WARNING (CWE-195): [#def2]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp: scope_hint: In member function 'void LibRaw::selectCRXTrack()'
LibRaw-0.21.4/internal/defines.h:107:24: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'uint32_t' {aka 'unsigned int'}
LibRaw-0.21.4/internal/defines.h:108:27: note: in definition of macro 'MAX'
LibRaw-0.21.4/internal/defines.h:109:35: note: in expansion of macro 'MIN'
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:145:22: note: in expansion of macro 'LIM'
Error: COMPILER_WARNING: [#def3]
LibRaw-0.21.4/libraw/libraw.h:86: included_from: Included from here.
LibRaw-0.21.4/internal/libraw_cxx_defs.h:28: included_from: Included from here.
LibRaw-0.21.4/libraw/libraw_alloc.h: scope_hint: In member function 'libraw_memmgr::realloc(void*, unsigned long)'
LibRaw-0.21.4/libraw/libraw_alloc.h:63:15: warning[-Wuse-after-free]: pointer 'ptr_7(D)' used after 'realloc'
LibRaw-0.21.4/libraw/libraw_alloc.h:62:26: note: call to 'realloc' here
Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
LibRaw-0.21.4/samples/half_mt.c:162:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘queue’
LibRaw-0.21.4/samples/half_mt.c:134:6: branch_false: following ‘false’ branch (when ‘ac > 1’)...
LibRaw-0.21.4/samples/half_mt.c:137:18: branch_false: ...to here
LibRaw-0.21.4/samples/half_mt.c:137:11: acquire_memory: this call could return NULL
LibRaw-0.21.4/samples/half_mt.c:139:15: branch_true: following ‘true’ branch (when ‘i < ac’)...
LibRaw-0.21.4/samples/half_mt.c:141:11: branch_true: ...to here
LibRaw-0.21.4/samples/half_mt.c:141:8: branch_false: following ‘false’ branch...
LibRaw-0.21.4/samples/half_mt.c:162:12: branch_false: ...to here
LibRaw-0.21.4/samples/half_mt.c:162:7: danger: ‘queue + qsize * 8’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-688): [#def5]
LibRaw-0.21.4/samples/half_mt.c:167:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘threads’ where non-null expected
LibRaw-0.21.4/samples/half_mt.c:134:6: branch_false: following ‘false’ branch (when ‘ac > 1’)...
LibRaw-0.21.4/samples/half_mt.c:137:18: branch_false: ...to here
LibRaw-0.21.4/samples/half_mt.c:139:15: branch_true: following ‘true’ branch (when ‘i < ac’)...
LibRaw-0.21.4/samples/half_mt.c:141:11: branch_true: ...to here
LibRaw-0.21.4/samples/half_mt.c:139:15: branch_false: following ‘false’ branch (when ‘i >= ac’)...
LibRaw-0.21.4/samples/half_mt.c:164:3: branch_false: ...to here
LibRaw-0.21.4/samples/half_mt.c:165:13: acquire_memory: this call could return NULL
LibRaw-0.21.4/samples/half_mt.c:166:15: branch_true: following ‘true’ branch (when ‘i < max_threads’)...
LibRaw-0.21.4/samples/half_mt.c:167:28: branch_true: ...to here
LibRaw-0.21.4/samples/half_mt.c:167:5: danger: argument 1 (‘threads + (long unsigned int)i * 8’) from [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-476): [#def6]
LibRaw-0.21.4/samples/half_mt.c:171: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: threads
Error: COMPILER_WARNING (CWE-483): [#def7]
LibRaw-0.21.4/src/decoders/crx.cpp: scope_hint: In function 'int crxMakeQStep(CrxImage*, CrxTile*, int32_t*, uint32_t)'
LibRaw-0.21.4/src/decoders/crx.cpp:2004:3: warning[-Wmisleading-indentation]: this 'if' clause does not guard...
LibRaw-0.21.4/src/decoders/crx.cpp:2006:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
Error: COMPILER_WARNING (CWE-195): [#def8]
LibRaw-0.21.4/src/decoders/crx.cpp: scope_hint: In member function 'void LibRaw::crxLoadRaw()'
LibRaw-0.21.4/src/decoders/crx.cpp:2696:13: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'unsigned int' and 'int32_t' {aka 'int'}
Error: CPPCHECK_WARNING (CWE-823): [#def9]
LibRaw-0.21.4/src/decoders/decoders_libraw.cpp:97: error[arrayIndexOutOfBounds]: Array 'tiff_ifd[10]' accessed at index 15, which is out of bounds.
Error: CPPCHECK_WARNING (CWE-823): [#def10]
LibRaw-0.21.4/src/decoders/decoders_libraw.cpp:104: error[arrayIndexOutOfBounds]: Array 'tiff_ifd[10]' accessed at index 15, which is out of bounds.
Error: CPPCHECK_WARNING (CWE-823): [#def11]
LibRaw-0.21.4/src/decoders/decoders_libraw.cpp:106: error[arrayIndexOutOfBounds]: Array 'tiff_ifd[10]' accessed at index 15, which is out of bounds.
Error: COMPILER_WARNING (CWE-195): [#def12]
LibRaw-0.21.4/src/decoders/decoders_libraw_dcrdefs.cpp: scope_hint: In member function 'void LibRaw::sony_ljpeg_load_raw()'
LibRaw-0.21.4/src/decoders/decoders_libraw_dcrdefs.cpp:91:65: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'unsigned int' and 'int'
Error: COMPILER_WARNING (CWE-195): [#def13]
LibRaw-0.21.4/src/decoders/decoders_libraw_dcrdefs.cpp:95:67: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'unsigned int' and 'int'
Error: COMPILER_WARNING (CWE-195): [#def14]
LibRaw-0.21.4/src/decoders/fp_dng.cpp: scope_hint: In member function 'void LibRaw::uncompressed_fp_dng_load_raw()'
LibRaw-0.21.4/src/decoders/fp_dng.cpp:642:51: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'}
Error: COMPILER_WARNING (CWE-195): [#def15]
LibRaw-0.21.4/src/decoders/fp_dng.cpp:657:34: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'}
Error: COMPILER_WARNING (CWE-195): [#def16]
LibRaw-0.21.4/src/decoders/load_mfbacks.cpp: scope_hint: In member function 'int LibRaw::phase_one_correct()'
LibRaw-0.21.4/src/decoders/load_mfbacks.cpp:524:66: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'unsigned int'
Error: COMPILER_WARNING (CWE-195): [#def17]
LibRaw-0.21.4/src/decoders/load_mfbacks.cpp:531:31: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'unsigned int'
Error: CPPCHECK_WARNING (CWE-823): [#def18]
LibRaw-0.21.4/src/demosaic/ahd_demosaic.cpp:58: error[arrayIndexOutOfBounds]: Array 'rgb[3]' accessed at index 3, which is out of bounds.
Error: CPPCHECK_WARNING (CWE-823): [#def19]
LibRaw-0.21.4/src/demosaic/ahd_demosaic.cpp:59: error[arrayIndexOutOfBounds]: Array 'rgb[3]' accessed at index 3, which is out of bounds.
Error: CPPCHECK_WARNING (CWE-823): [#def20]
LibRaw-0.21.4/src/demosaic/ahd_demosaic.cpp:60: error[arrayIndexOutOfBounds]: Array 'rgb[3]' accessed at index 3, which is out of bounds.
Error: CPPCHECK_WARNING (CWE-476): [#def21]
LibRaw-0.21.4/src/demosaic/dht_demosaic.cpp:228: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: nraw
Error: COMPILER_WARNING (CWE-195): [#def22]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp: scope_hint: In member function 'int LibRaw::selectCRXFrame(short int, unsigned int)'
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:38:21: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'uint32_t' {aka 'unsigned int'}
Error: COMPILER_WARNING (CWE-195): [#def23]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:42:50: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'uint32_t' {aka 'unsigned int'}
Error: COMPILER_WARNING (CWE-195): [#def24]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:45:23: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'uint32_t' {aka 'unsigned int'}
Error: COMPILER_WARNING (CWE-563): [#def25]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:71:47: warning[-Wunused-variable]: unused variable 'maxframecount'
Error: COMPILER_WARNING (CWE-563): [#def26]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:77:7: warning[-Wunused-variable]: unused variable 'err'
Error: COMPILER_WARNING (CWE-563): [#def27]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:142:19: warning[-Wunused-variable]: unused variable 'trackcnt'
Error: COMPILER_WARNING (CWE-563): [#def28]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:448:12: warning[-Wunused-variable]: unused variable 'relpos_inDir'
Error: COMPILER_WARNING (CWE-563): [#def29]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:448:26: warning[-Wunused-variable]: unused variable 'relpos_inBox'
Error: COMPILER_WARNING (CWE-563): [#def30]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:449:12: warning[-Wunused-variable]: unused variable 'szItem'
Error: COMPILER_WARNING (CWE-563): [#def31]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:449:20: warning[-Wunused-variable]: unused variable 'Tag'
Error: COMPILER_WARNING (CWE-563): [#def32]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:449:25: warning[-Wunused-variable]: unused variable 'lTag'
Error: COMPILER_WARNING (CWE-563): [#def33]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:450:10: warning[-Wunused-variable]: unused variable 'tItem'
Error: COMPILER_WARNING (CWE-195): [#def34]
LibRaw-0.21.4/src/metadata/cr3_parser.cpp: scope_hint: In member function 'int LibRaw::parseCR3(INT64, INT64, short int&, char*, short int&, short int&)'
LibRaw-0.21.4/src/metadata/cr3_parser.cpp:827:23: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'uint32_t' {aka 'unsigned int'}
Error: COMPILER_WARNING: [#def35]
LibRaw-0.21.4/src/metadata/fuji.cpp:918:45: warning[-Wformat-truncation=]: ' ' directive output may be truncated writing 1 byte into a region of size between 0 and 63
/usr/include/bits/stdio2.h:68:35: note: '__snprintf_chk' output 2 or more bytes (assuming 65) into a destination of size 63
Error: COMPILER_WARNING: [#def36]
LibRaw-0.21.4/src/metadata/fuji.cpp: scope_hint: In member function 'LibRaw::parseFujiMakernotes(unsigned int, unsigned int, unsigned int, unsigned int)'
LibRaw-0.21.4/src/metadata/fuji.cpp:920:18: warning[-Wstringop-truncation]: 'strncpy' output may be truncated copying 63 bytes from a string of length 63
Error: COMPILER_WARNING: [#def37]
LibRaw-0.21.4/src/metadata/fuji.cpp: scope_hint: In member function 'LibRaw::parseFujiMakernotes(unsigned int, unsigned int, unsigned int, unsigned int)'
LibRaw-0.21.4/src/metadata/fuji.cpp:940:16: warning[-Wstringop-truncation]: 'strncpy' specified bound 2 equals destination size
Error: COMPILER_WARNING: [#def38]
LibRaw-0.21.4/src/metadata/fuji.cpp:989:18: warning[-Wstringop-truncation]: 'strncpy' output may be truncated copying 63 bytes from a string of length 63
Error: COMPILER_WARNING: [#def39]
LibRaw-0.21.4/src/metadata/fuji.cpp:996:39: warning[-Wformat-truncation=]: '%s' directive output may be truncated writing up to 15 bytes into a region of size between 0 and 63
LibRaw-0.21.4/src/metadata/fuji.cpp:996:35: note: directive argument in the range [64, 2769]
/usr/include/bits/stdio2.h:68:35: note: '__snprintf_chk' output 8 or more bytes (assuming 92) into a destination of size 64
Error: COMPILER_WARNING: [#def40]
LibRaw-0.21.4/src/metadata/fuji.cpp: scope_hint: In member function 'LibRaw::parseFujiMakernotes(unsigned int, unsigned int, unsigned int, unsigned int)'
LibRaw-0.21.4/src/metadata/fuji.cpp:1002:18: warning[-Wstringop-truncation]: 'strncpy' output may be truncated copying 63 bytes from a string of length 63
Error: COMPILER_WARNING: [#def41]
LibRaw-0.21.4/src/metadata/hasselblad_model.cpp: scope_hint: In member function 'LibRaw::parseHassyModel()'
LibRaw-0.21.4/src/metadata/hasselblad_model.cpp:192:14: warning[-Wstringop-truncation]: 'strncpy' output may be truncated copying 63 bytes from a string of length 63
Error: COMPILER_WARNING (CWE-195): [#def42]
LibRaw-0.21.4/src/metadata/identify.cpp: scope_hint: In member function 'void LibRaw::identify()'
LibRaw-0.21.4/src/metadata/identify.cpp:498:14: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'INT64' {aka 'long long int'} and 'long long unsigned int'
Error: COMPILER_WARNING (CWE-195): [#def43]
LibRaw-0.21.4/src/metadata/identify.cpp:498:59: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'INT64' {aka 'long long int'} and 'long long unsigned int'
Error: COMPILER_WARNING (CWE-195): [#def44]
LibRaw-0.21.4/src/metadata/identify.cpp:725:19: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'INT64' {aka 'long long int'} and 'long long unsigned int'
Error: COMPILER_WARNING (CWE-195): [#def45]
LibRaw-0.21.4/src/metadata/identify.cpp:730:17: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'INT64' {aka 'long long int'} and 'long long unsigned int'
Error: COMPILER_WARNING (CWE-195): [#def46]
LibRaw-0.21.4/src/metadata/tiff.cpp: scope_hint: In member function 'int LibRaw::parse_tiff_ifd(int)'
LibRaw-0.21.4/src/metadata/tiff.cpp:1060:48: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'unsigned int'
Error: COMPILER_WARNING (CWE-195): [#def47]
LibRaw-0.21.4/src/metadata/tiff.cpp:1069:57: warning[-Wsign-compare]: comparison of integer expressions of different signedness: 'int' and 'unsigned int'
Error: COMPILER_WARNING (CWE-252): [#def48]
LibRaw-0.21.4/src/preprocessing/ext_preprocess.cpp: scope_hint: In member function 'void LibRaw::subtract(const char*)'
LibRaw-0.21.4/src/preprocessing/ext_preprocess.cpp:119:10: warning[-Wunused-result]: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)' declared with attribute 'warn_unused_result'
Error: CPPCHECK_WARNING (CWE-786): [#def49]
LibRaw-0.21.4/src/utils/curves.cpp:152: error[negativeIndex]: Array 'imgdata.color.curve[65536]' accessed at index -1, which is out of bounds.
Error: COMPILER_WARNING (CWE-758): [#def50]
LibRaw-0.21.4/src/utils/utils_libraw.cpp: scope_hint: In member function 'void LibRaw::libraw_swab(void*, size_t)'
LibRaw-0.21.4/src/utils/utils_libraw.cpp:670:13: warning[-Wrestrict]: passing argument 2 to 'restrict'-qualified parameter aliases with argument 1
Error: COMPILER_WARNING (CWE-563): [#def51]
LibRaw-0.21.4/src/write/apply_profile.cpp: scope_hint: In member function 'void LibRaw::apply_profile(const char*, const char*)'
LibRaw-0.21.4/src/write/apply_profile.cpp:24:9: warning[-Wunused-variable]: unused variable 'prof'
Error: COMPILER_WARNING (CWE-252): [#def52]
LibRaw-0.21.4/src/write/apply_profile.cpp:49:10: warning[-Wunused-result]: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)' declared with attribute 'warn_unused_result'
Error: COMPILER_WARNING (CWE-252): [#def53]
LibRaw-0.21.4/src/write/apply_profile.cpp:52:10: warning[-Wunused-result]: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)' declared with attribute 'warn_unused_result'
Error: COMPILER_WARNING: [#def54]
LibRaw-0.21.4/src/write/file_write.cpp: scope_hint: In member function 'LibRaw::tiff_head(tiff_hdr*, int)'
LibRaw-0.21.4/src/write/file_write.cpp:78:27: warning[-Wformat-overflow=]: '%02d' directive writing between 2 and 11 bytes into a region of size between 8 and 15
LibRaw-0.21.4/src/write/file_write.cpp:78:21: note: directive argument in the range [-2147483647, 2147483647]
/usr/include/bits/stdio2.h:30:34: note: '__sprintf_chk' output between 20 and 72 bytes into a destination of size 20
Scan Properties
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-252.us-west-2.compute.internal |
known-false-positives | /usr/share/csmock/known-false-positives.js |
known-false-positives-rpm | known-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | LibRaw-0.21.4-1.fc43 |
store-results-to | /tmp/tmpm9gajarl/LibRaw-0.21.4-1.fc43.tar.xz |
time-created | 2025-04-25 12:02:01 |
time-finished | 2025-04-25 12:06:02 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpm9gajarl/LibRaw-0.21.4-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpm9gajarl/LibRaw-0.21.4-1.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |