Error: GCC_ANALYZER_WARNING (CWE-476): [#def1] libeconf-0.7.4-build/libeconf-0.7.4/lib/getfilecontents.c: scope_hint: In function ‘read_file’ libeconf-0.7.4-build/libeconf-0.7.4/lib/getfilecontents.c:507:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘strdup(buf)’ # 505| bool found_delim = false; # 506| if (ef->python_style == false || # 507|-> !isspace(*org_buf)) # 508| { # 509| /* It is not a typical python style with indentation */ Error: GCC_ANALYZER_WARNING (CWE-476): [#def2] libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c: scope_hint: In function ‘econf_readConfigWithCallback’ libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c:348:31: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘**key_file.conf_dirs’ # 346| (*key_file)->conf_dirs = calloc((*key_file)->conf_count +1, sizeof(char *)); # 347| (*key_file)->conf_dirs[(*key_file)->conf_count] = NULL; # 348|-> (*key_file)->conf_dirs[0] = strdup(".d"); # 349| } # 350| Error: GCC_ANALYZER_WARNING (CWE-476): [#def3] libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c:348:31: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(2, 8)’ # 346| (*key_file)->conf_dirs = calloc((*key_file)->conf_count +1, sizeof(char *)); # 347| (*key_file)->conf_dirs[(*key_file)->conf_count] = NULL; # 348|-> (*key_file)->conf_dirs[0] = strdup(".d"); # 349| } # 350| Error: GCC_ANALYZER_WARNING (CWE-476): [#def4] libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c: scope_hint: In function ‘econf_readDirsHistoryWithCallback’ libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c:434:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘parse_dirs’ # 432| parse_dirs[count] = NULL; # 433| if (dist_conf_dir) # 434|-> parse_dirs[0] = strdup(dist_conf_dir); # 435| else # 436| parse_dirs[0] = strdup(""); Error: GCC_ANALYZER_WARNING (CWE-476): [#def5] libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c:436:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘parse_dirs’ # 434| parse_dirs[0] = strdup(dist_conf_dir); # 435| else # 436|-> parse_dirs[0] = strdup(""); # 437| if (etc_conf_dir) # 438| parse_dirs[1] = strdup(etc_conf_dir); Error: GCC_ANALYZER_WARNING (CWE-476): [#def6] libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c: scope_hint: In function ‘econf_readDirsHistory’ libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c:470:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘parse_dirs’ # 468| parse_dirs[count] = NULL; # 469| if (dist_conf_dir) # 470|-> parse_dirs[0] = strdup(dist_conf_dir); # 471| else # 472| parse_dirs[0] = strdup(""); Error: GCC_ANALYZER_WARNING (CWE-476): [#def7] libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c:472:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘parse_dirs’ # 470| parse_dirs[0] = strdup(dist_conf_dir); # 471| else # 472|-> parse_dirs[0] = strdup(""); # 473| if (etc_conf_dir) # 474| parse_dirs[1] = strdup(etc_conf_dir); Error: GCC_ANALYZER_WARNING (CWE-476): [#def8] libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c: scope_hint: In function ‘econf_readDirsWithCallback’ libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c:507:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(3, 8)’ # 505| (*result)->parse_dirs[(*result)->parse_dirs_count] = NULL; # 506| if (dist_conf_dir) # 507|-> (*result)->parse_dirs[0] = strdup(dist_conf_dir); # 508| else # 509| (*result)->parse_dirs[0] = strdup(""); Error: GCC_ANALYZER_WARNING (CWE-476): [#def9] libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c:509:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(3, 8)’ # 507| (*result)->parse_dirs[0] = strdup(dist_conf_dir); # 508| else # 509|-> (*result)->parse_dirs[0] = strdup(""); # 510| if (etc_conf_dir) # 511| (*result)->parse_dirs[1] = strdup(etc_conf_dir); Error: GCC_ANALYZER_WARNING (CWE-476): [#def10] libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c: scope_hint: In function ‘econf_readDirs’ libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c:538:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(3, 8)’ # 536| (*result)->parse_dirs[(*result)->parse_dirs_count] = NULL; # 537| if (dist_conf_dir) # 538|-> (*result)->parse_dirs[0] = strdup(dist_conf_dir); # 539| else # 540| (*result)->parse_dirs[0] = strdup(""); Error: GCC_ANALYZER_WARNING (CWE-476): [#def11] libeconf-0.7.4-build/libeconf-0.7.4/lib/libeconf.c:540:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(3, 8)’ # 538| (*result)->parse_dirs[0] = strdup(dist_conf_dir); # 539| else # 540|-> (*result)->parse_dirs[0] = strdup(""); # 541| if (etc_conf_dir) # 542| (*result)->parse_dirs[1] = strdup(etc_conf_dir);
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 |
diffbase-analyzer-version-clippy | 1.82.0 |
diffbase-analyzer-version-cppcheck | 2.16.0 |
diffbase-analyzer-version-gcc | 14.2.1 |
diffbase-analyzer-version-gcc-analyzer | 15.0.0 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-unicontrol | 0.0.2 |
diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-53.us-west-2.compute.internal |
diffbase-mock-config | fedora-rawhide-gcc-latest-x86_64 |
diffbase-project-name | libeconf-0.6.2-3.fc41 |
diffbase-store-results-to | /tmp/tmp02figxlo/libeconf-0.6.2-3.fc41.tar.xz |
diffbase-time-created | 2024-11-13 01:18:20 |
diffbase-time-finished | 2024-11-13 01:19:57 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp02figxlo/libeconf-0.6.2-3.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp02figxlo/libeconf-0.6.2-3.fc41.src.rpm' |
diffbase-tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-53.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | libeconf-0.7.4-3.fc42 |
store-results-to | /tmp/tmp_1a9e9x0/libeconf-0.7.4-3.fc42.tar.xz |
time-created | 2024-11-13 01:20:22 |
time-finished | 2024-11-13 01:21:35 |
title | Newly introduced findings |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp_1a9e9x0/libeconf-0.7.4-3.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp_1a9e9x0/libeconf-0.7.4-3.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |