libudfread-1.2.0-2.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libudfread-1.2.0/src/default_blockinput.c:201:13: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libudfread-1.2.0/src/default_blockinput.c:193:52: acquire_memory: allocated here
libudfread-1.2.0/src/default_blockinput.c:194:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libudfread-1.2.0/src/default_blockinput.c:201:13: branch_false: ...to here
libudfread-1.2.0/src/default_blockinput.c:201:13: throw: if ‘open’ throws an exception...
libudfread-1.2.0/src/default_blockinput.c:201:13: danger: ‘p’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  199|       p->fd = _open_win32(path, O_RDONLY | O_BINARY);
#  200|   #else
#  201|->     p->fd = open(path, O_RDONLY);
#  202|   #endif
#  203|       if(p->fd < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libudfread-1.2.0/src/default_blockinput.c:212:12: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
libudfread-1.2.0/src/default_blockinput.c:193:52: acquire_memory: allocated here
libudfread-1.2.0/src/default_blockinput.c:194:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
libudfread-1.2.0/src/default_blockinput.c:201:13: branch_false: ...to here
libudfread-1.2.0/src/default_blockinput.c:203:7: branch_false: following ‘false’ branch...
libudfread-1.2.0/src/default_blockinput.c:208:5: branch_false: ...to here
libudfread-1.2.0/src/default_blockinput.c:212:12: danger: ‘p’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  210|       p->input.size  = _def_size;
#  211|   
#  212|->     return &p->input;
#  213|   }

Error: GCC_ANALYZER_WARNING (CWE-465): [#def3]
libudfread-1.2.0/src/ecma167.c:366:8: warning[-Wanalyzer-deref-before-check]: check of ‘fe’ for NULL after already dereferencing it
libudfread-1.2.0/src/ecma167.c:347:8: branch_false: following ‘false’ branch...
libudfread-1.2.0/src/ecma167.c:360:8: branch_false: following ‘false’ branch (when ‘num_ad != 0’)...
libudfread-1.2.0/src/ecma167.c:365:100: branch_false: ...to here
libudfread-1.2.0/src/ecma167.c:366:8: danger: pointer ‘fe’ is checked for NULL here but it was already dereferenced at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  364|   
#  365|       fe = (struct file_entry *)realloc(*p_fe, sizeof(struct file_entry) + sizeof(struct long_ad) * (fe->u.ads.num_ad + num_ad));
#  366|->     if (!fe) {
#  367|           return -1;
#  368|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
libudfread-1.2.0/src/udfread.c:257:14: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
libudfread-1.2.0/src/udfread.c:1434:17: enter_function: entry to ‘_file_open’
libudfread-1.2.0/src/udfread.c:1439:8: branch_false: following ‘false’ branch...
libudfread-1.2.0/src/udfread.c:1444:10: branch_false: ...to here
libudfread-1.2.0/src/udfread.c:1444:10: call_function: calling ‘_read_file_entry’ from ‘_file_open’
#  255|       }
#  256|   
#  257|->     result = input->read(input, lba, buf, nblocks, flags);
#  258|   
#  259|       return result < 0 ? 0 : (uint32_t)result;

Error: COMPILER_WARNING: [#def5]
libudfread-1.2.0/src/udfread.c: scope_hint: In function ‘_read_subdir’
libudfread-1.2.0/src/udfread.c:1099:69: warning[-Wcalloc-transposed-args]: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
# 1099 |         struct udf_dir **subdirs = (struct udf_dir **)calloc(sizeof(struct udf_dir *), dir->num_entries);
#      |                                                                     ^~~~~~
libudfread-1.2.0/src/udfread.c:1099:69: note: earlier argument should specify number of elements, later size of each element
# 1097|   
# 1098|       if (!dir->subdirs) {
# 1099|->         struct udf_dir **subdirs = (struct udf_dir **)calloc(sizeof(struct udf_dir *), dir->num_entries);
# 1100|           if (!subdirs) {
# 1101|               udf_error("out of memory\n");

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-197.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibudfread-1.2.0-2.fc44
store-results-to/tmp/tmpjr4fkbku/libudfread-1.2.0-2.fc44.tar.xz
time-created2026-01-08 19:20:29
time-finished2026-01-08 19:21:41
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpjr4fkbku/libudfread-1.2.0-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpjr4fkbku/libudfread-1.2.0-2.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9