Error: GCC_ANALYZER_WARNING (CWE-775): [#def1] image-builder-cli-48/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘parse_proc_stringlist’ image-builder-cli-48/vendor/github.com/containers/storage/pkg/unshare/unshare.c:156:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ # 154| ret[i] = NULL; # 155| return ret; # 156|-> } # 157| # 158| /* Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] image-builder-cli-48/vendor/github.com/containers/storage/pkg/unshare/unshare.c:156:1: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ # 154| ret[i] = NULL; # 155| return ret; # 156|-> } # 157| # 158| /* Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] image-builder-cli-48/vendor/github.com/containers/storage/pkg/unshare/unshare.c:156:1: warning[-Wanalyzer-malloc-leak]: leak of ‘new_buf’ # 154| ret[i] = NULL; # 155| return ret; # 156|-> } # 157| # 158| /* Error: COMPILER_WARNING (CWE-704): [#def4] image-builder-cli-48/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c: scope_hint: In function ‘sqlite3ShadowTableName’ image-builder-cli-48/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c:124684:9: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type #124684 | zTail = strrchr(zName, '_'); # | ^ #124682| char *zTail; /* Pointer to the last "_" in zName */ #124683| Table *pTab; /* Table that zName is a shadow of */ #124684|-> zTail = strrchr(zName, '_'); #124685| if( zTail==0 ) return 0; #124686| *zTail = 0; Error: CPPCHECK_WARNING (CWE-476): [#def5] image-builder-cli-48/vendor/github.com/miekg/pkcs11/pkcs11.go:77: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: c # 75| CK_C_GetFunctionList list; # 76| struct ctx *c = calloc(1, sizeof(struct ctx)); # 77|-> c->handle = dlopen(module, RTLD_LAZY); # 78| if (c->handle == NULL) { # 79| free(c); Error: GCC_ANALYZER_WARNING (CWE-476): [#def6] image-builder-cli-48/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function 'New' image-builder-cli-48/vendor/github.com/miekg/pkcs11/pkcs11.go:77:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'c' # 75| CK_C_GetFunctionList list; # 76| struct ctx *c = calloc(1, sizeof(struct ctx)); # 77|-> c->handle = dlopen(module, RTLD_LAZY); # 78| if (c->handle == NULL) { # 79| free(c); Error: GCC_ANALYZER_WARNING (CWE-476): [#def7] image-builder-cli-48/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘New’ image-builder-cli-48/vendor/github.com/miekg/pkcs11/pkcs11.go:77:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘c’ # 75| CK_C_GetFunctionList list; # 76| struct ctx *c = calloc(1, sizeof(struct ctx)); # 77|-> c->handle = dlopen(module, RTLD_LAZY); # 78| if (c->handle == NULL) { # 79| free(c); Error: CPPCHECK_WARNING (CWE-476): [#def8] image-builder-cli-48/vendor/github.com/miekg/pkcs11/pkcs11.go:78: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: c # 76| struct ctx *c = calloc(1, sizeof(struct ctx)); # 77| c->handle = dlopen(module, RTLD_LAZY); # 78|-> if (c->handle == NULL) { # 79| free(c); # 80| return NULL; Error: CPPCHECK_WARNING (CWE-476): [#def9] image-builder-cli-48/vendor/github.com/miekg/pkcs11/pkcs11.go:82: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: c # 80| return NULL; # 81| } # 82|-> list = (CK_C_GetFunctionList) dlsym(c->handle, "C_GetFunctionList"); # 83| if (list == NULL) { # 84| free(c); Error: CPPCHECK_WARNING (CWE-476): [#def10] image-builder-cli-48/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:60: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret # 58| # 59| ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null # 60|-> strcpy(ret, enc); # 61| ret[strlen(enc)]= '\0'; # 62| Error: GCC_ANALYZER_WARNING (CWE-688): [#def11] image-builder-cli-48/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go: scope_hint: In function 'gnu_ext_crypt' image-builder-cli-48/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:60:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'ret' where non-null expected image-builder-cli-48/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:45: included_from: Included from here. /usr/include/string.h:156:14: note: argument 1 of 'strcpy' must be non-null # 58| # 59| ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null # 60|-> strcpy(ret, enc); # 61| ret[strlen(enc)]= '\0'; # 62| Error: GCC_ANALYZER_WARNING (CWE-688): [#def12] image-builder-cli-48/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go: scope_hint: In function ‘gnu_ext_crypt’ image-builder-cli-48/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:60:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected image-builder-cli-48/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:45: included_from: Included from here. /usr/include/string.h:156:14: note: argument 1 of ‘strcpy’ must be non-null # 58| # 59| ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null # 60|-> strcpy(ret, enc); # 61| ret[strlen(enc)]= '\0'; # 62| Error: CPPCHECK_WARNING (CWE-476): [#def13] image-builder-cli-48/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:61: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret # 59| ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null # 60| strcpy(ret, enc); # 61|-> ret[strlen(enc)]= '\0'; # 62| # 63| return ret;
| analyzer-version-clippy | 1.93.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.1 |
| analyzer-version-gcc-analyzer | 16.0.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-36.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.20260119.105402.g7a5be1b.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | image-builder-48-1.20260205163614977774.main.8.g9991cf2 |
| store-results-to | /tmp/tmptrk2h110/image-builder-48-1.20260205163614977774.main.8.g9991cf2.tar.xz |
| time-created | 2026-02-06 18:10:34 |
| time-finished | 2026-02-06 18:15:08 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,unicontrol,shellcheck,gcc,clippy' '-o' '/tmp/tmptrk2h110/image-builder-48-1.20260205163614977774.main.8.g9991cf2.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmptrk2h110/image-builder-48-1.20260205163614977774.main.8.g9991cf2.src.rpm' |
| tool-version | csmock-3.8.3.20260128.181932.g41af877-1.el9 |