Error: CPPCHECK_WARNING (CWE-457): [#def1] usbutils-018-build/usbutils-018/lsusb-t.c:517: error[uninitvar]: Uninitialized variable: pd # 515| char n[MY_SYSFS_FILENAME_LEN], *p; # 516| # 517|-> list_for_each(&usbdevlist, pd, list) { # 518| if (pd == d) # 519| continue; Error: CPPCHECK_WARNING (CWE-457): [#def2] usbutils-018-build/usbutils-018/lsusb-t.c:575: error[uninitvar]: Uninitialized variable: d # 573| struct usbinterface *e; # 574| # 575|-> list_for_each(&usbdevlist, d, list) { # 576| if (d->parent_portnum) # 577| assign_dev_to_parent(d); Error: CPPCHECK_WARNING (CWE-457): [#def3] usbutils-018-build/usbutils-018/lsusb-t.c:581: error[legacyUninitvar]: Uninitialized variable: e # 579| assign_dev_to_bus(d); # 580| # 581|-> list_for_each(&interfacelist, e, list) { # 582| if (!e->parent) # 583| assign_interface_to_parent(d, e); Error: CPPCHECK_WARNING (CWE-457): [#def4] usbutils-018-build/usbutils-018/lsusb-t.c:726: error[uninitvar]: Uninitialized variable: device # 724| struct usbbusnode *bus, *tempb; # 725| # 726|-> list_for_each_safe(&usbdevlist, device, tempd, list) { # 727| free(device); # 728| } Error: CPPCHECK_WARNING (CWE-457): [#def5] usbutils-018-build/usbutils-018/lsusb-t.c:730: error[uninitvar]: Uninitialized variable: interface # 728| } # 729| # 730|-> list_for_each_safe(&interfacelist, interface, templ, list) { # 731| free(interface); # 732| } Error: GCC_ANALYZER_WARNING (CWE-127): [#def6] usbutils-018-build/usbutils-018/usbmisc.c: scope_hint: In function ‘get_absolute_path’ usbutils-018-build/usbutils-018/usbmisc.c:80:51: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read usbutils-018-build/usbutils-018/usbmisc.c:80:51: note: valid subscripts for ‘absolute_path’ are ‘[0]’ to ‘[4096]’ # 78| result_size--; # 79| } else if (*ppath == '.' && *(ppath + 1) == '.' && # 80|-> *(ppath + 2) == '/' && *(presult - 1) == '/') { # 81| if ((presult - 1) != result) { # 82| /* go one directory upper */ Error: GCC_ANALYZER_WARNING (CWE-127): [#def7] usbutils-018-build/usbutils-018/usbmisc.c:86:42: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read usbutils-018-build/usbutils-018/usbmisc.c:86:42: note: valid subscripts for ‘absolute_path’ are ‘[0]’ to ‘[4096]’ # 84| presult--; # 85| result_size++; # 86|-> } while (*(presult - 1) != '/'); # 87| } # 88| ppath += 3; Error: GCC_ANALYZER_WARNING (CWE-127): [#def8] usbutils-018-build/usbutils-018/usbmisc.c:91:28: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read usbutils-018-build/usbutils-018/usbmisc.c:91:28: note: valid subscripts for ‘absolute_path’ are ‘[0]’ to ‘[4096]’ # 89| } else if (*ppath == '.' && # 90| *(ppath + 1) == '/' && # 91|-> *(presult - 1) == '/') { # 92| ppath += 2; # 93| } else { Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] usbutils-018-build/usbutils-018/usbmisc.c: scope_hint: In function ‘usb_string_to_native’ usbutils-018-build/usbutils-018/usbmisc.c:169:12: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(nl_langinfo(14), "UTF-16LE")’ # 167| conv = iconv_open(nl_langinfo(CODESET), "UTF-16LE"); # 168| # 169|-> if (conv == (iconv_t) -1) # 170| return NULL; # 171|
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
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-76.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | usbutils-018-1.fc42 |
store-results-to | /tmp/tmpoeqf8q4g/usbutils-018-1.fc42.tar.xz |
time-created | 2024-11-13 03:27:34 |
time-finished | 2024-11-13 03:28:58 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpoeqf8q4g/usbutils-018-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpoeqf8q4g/usbutils-018-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |