Error: CPPCHECK_WARNING (CWE-476): [#def1] subscription-manager-1.30.16/src/plugins/libdnf/product-id.c:165: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: repoProductId # 163| RepoProductId *initRepoProductId(void) { # 164| RepoProductId *repoProductId = (RepoProductId*) malloc(sizeof(RepoProductId)); # 165|-> repoProductId->repo = NULL; # 166| repoProductId->productIdPath = NULL; # 167| repoProductId->isInstalled = FALSE; Error: GCC_ANALYZER_WARNING (CWE-476): [#def2] subscription-manager-1.30.16/src/plugins/libdnf/product-id.c: scope_hint: In function ‘initRepoProductId’ subscription-manager-1.30.16/src/plugins/libdnf/product-id.c:165:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘repoProductId’ subscription-manager-1.30.16/src/plugins/libdnf/product-id.c:15: included_from: Included from here. /usr/include/glib-2.0/glib.h:33: included_from: Included from here. /usr/include/glib-2.0/gobject/gbinding.h:30: included_from: Included from here. /usr/include/glib-2.0/glib-object.h:24: included_from: Included from here. /usr/include/glib-2.0/gio/gioenums.h:30: included_from: Included from here. /usr/include/glib-2.0/gio/giotypes.h:30: included_from: Included from here. /usr/include/glib-2.0/gio/gio.h:28: included_from: Included from here. /usr/include/libdnf/dnf-types.h:27: included_from: Included from here. /usr/include/libdnf/plugin/plugin.h:24: included_from: Included from here. # 163| RepoProductId *initRepoProductId(void) { # 164| RepoProductId *repoProductId = (RepoProductId*) malloc(sizeof(RepoProductId)); # 165|-> repoProductId->repo = NULL; # 166| repoProductId->productIdPath = NULL; # 167| repoProductId->isInstalled = FALSE; Error: CPPCHECK_WARNING (CWE-476): [#def3] subscription-manager-1.30.16/src/plugins/libdnf/product-id.c:166: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: repoProductId # 164| RepoProductId *repoProductId = (RepoProductId*) malloc(sizeof(RepoProductId)); # 165| repoProductId->repo = NULL; # 166|-> repoProductId->productIdPath = NULL; # 167| repoProductId->isInstalled = FALSE; # 168| return repoProductId; Error: CPPCHECK_WARNING (CWE-476): [#def4] subscription-manager-1.30.16/src/plugins/libdnf/product-id.c:167: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: repoProductId # 165| repoProductId->repo = NULL; # 166| repoProductId->productIdPath = NULL; # 167|-> repoProductId->isInstalled = FALSE; # 168| return repoProductId; # 169| } Error: COMPILER_WARNING (CWE-704): [#def5] subscription-manager-1.30.16/src/plugins/libdnf/product-id.c: scope_hint: In function ‘findProductId’ subscription-manager-1.30.16/src/plugins/libdnf/product-id.c:1043:31: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type # 1041| for (int i = 0; i < exts; i++) { # 1042| char oid[MAX_BUFF]; # 1043|-> X509_EXTENSION *ext = X509_get_ext(x509, i); # 1044| if (ext == NULL) { # 1045| debug("Failed to get extension of X509 structure: %s", Error: CPPCHECK_WARNING (CWE-476): [#def6] subscription-manager-1.30.16/src/plugins/libdnf/productdb.c:34: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: productDb # 32| ProductDb *initProductDb() { # 33| ProductDb *productDb = malloc(sizeof(ProductDb)); # 34|-> productDb->path = NULL; # 35| // We do not provide method for freeing value, because it would be ineficient to # 36| // free and recreate GSList everytime we add/remove item in the list Error: GCC_ANALYZER_WARNING (CWE-476): [#def7] subscription-manager-1.30.16/src/plugins/libdnf/productdb.c: scope_hint: In function ‘initProductDb’ subscription-manager-1.30.16/src/plugins/libdnf/productdb.c:34:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘productDb’ # 32| ProductDb *initProductDb() { # 33| ProductDb *productDb = malloc(sizeof(ProductDb)); # 34|-> productDb->path = NULL; # 35| // We do not provide method for freeing value, because it would be ineficient to # 36| // free and recreate GSList everytime we add/remove item in the list Error: CPPCHECK_WARNING (CWE-476): [#def8] subscription-manager-1.30.16/src/plugins/libdnf/productdb.c:37: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: productDb # 35| // We do not provide method for freeing value, because it would be ineficient to # 36| // free and recreate GSList everytime we add/remove item in the list # 37|-> productDb->repoMap = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); # 38| return productDb; # 39| }
| analyzer-version-clippy | 1.99.1 |
| analyzer-version-cppcheck | 2.22.0 |
| analyzer-version-gcc | 16.2.1 |
| analyzer-version-gcc-analyzer | 16.2.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.99.1 |
| diffbase-analyzer-version-cppcheck | 2.22.0 |
| diffbase-analyzer-version-gcc | 16.2.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.2.1 |
| diffbase-analyzer-version-shellcheck | 0.11.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-192.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20260813.215201.gc98a3c4.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | subscription-manager-1.30.16-1.20261020141736491624.pr3787.56.g56189173b |
| diffbase-store-results-to | /tmp/tmp0b5f27e1/subscription-manager-1.30.16-1.20261020141736491624.pr3787.56.g56189173b.tar.xz |
| diffbase-time-created | 2026-10-20 14:36:20 |
| diffbase-time-finished | 2026-10-20 14:38:14 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '--root-override=fedora-rawhide-x86_64-f32fcf04-3168-4424-89fc-653219e738c2' '-t' 'unicontrol,cppcheck,shellcheck,clippy,gcc' '-o' '/tmp/tmp0b5f27e1/subscription-manager-1.30.16-1.20261020141736491624.pr3787.56.g56189173b.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp0b5f27e1/subscription-manager-1.30.16-1.20261020141736491624.pr3787.56.g56189173b.src.rpm' |
| diffbase-tool-version | csmock-3.8.7.20261019.142327.ge371d49-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-192.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.20260813.215201.gc98a3c4.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | subscription-manager-1.30.16-1.20261019173749396478.main.54.gce284dd9b |
| store-results-to | /tmp/tmp8tkj3n72/subscription-manager-1.30.16-1.20261019173749396478.main.54.gce284dd9b.tar.xz |
| time-created | 2026-10-20 14:33:33 |
| time-finished | 2026-10-20 14:35:45 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '--root-override=fedora-rawhide-x86_64-9bf64684-35d7-40ee-8e15-98f7796a2153' '-t' 'unicontrol,cppcheck,shellcheck,clippy,gcc' '-o' '/tmp/tmp8tkj3n72/subscription-manager-1.30.16-1.20261019173749396478.main.54.gce284dd9b.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp8tkj3n72/subscription-manager-1.30.16-1.20261019173749396478.main.54.gce284dd9b.src.rpm' |
| tool-version | csmock-3.8.7.20261019.142327.ge371d49-1.el9 |