Error: CPPCHECK_WARNING (CWE-476): [#def1] nvme-cli-2.13/plugins/ocp/ocp-telemetry-decode.c:475: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: description_str # 473| for (size_t i = 0; i < data_size; ++i) { # 474| sprintf(temp_buffer, "%02X", pdata[i]); # 475|-> strcat(description_str, temp_buffer); # 476| } # 477| Error: GCC_ANALYZER_WARNING (CWE-688): [#def2] nvme-cli-2.13/redhat-linux-build/../plugins/ocp/ocp-telemetry-decode.c:475:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘description_str’ where non-null expected nvme-cli-2.13/redhat-linux-build/../plugins/ocp/ocp-telemetry-decode.c:870:6: enter_function: entry to ‘parse_common_event’ nvme-cli-2.13/redhat-linux-build/../plugins/ocp/ocp-telemetry-decode.c:889:20: branch_true: following ‘true’ branch (when ‘pevent_fifos_object’ is non-NULL)... nvme-cli-2.13/redhat-linux-build/../plugins/ocp/ocp-telemetry-decode.c:890:25: branch_true: ...to here nvme-cli-2.13/redhat-linux-build/../plugins/ocp/ocp-telemetry-decode.c:890:25: call_function: calling ‘json_add_formatted_u32_str’ from ‘parse_common_event’ nvme-cli-2.13/redhat-linux-build/../plugins/ocp/ocp-telemetry-decode.c:890:25: return_function: returning to ‘parse_common_event’ from ‘json_add_formatted_u32_str’ nvme-cli-2.13/redhat-linux-build/../plugins/ocp/ocp-telemetry-decode.c:892:25: call_function: calling ‘json_object_add_value_string’ from ‘parse_common_event’ nvme-cli-2.13/redhat-linux-build/../plugins/ocp/ocp-telemetry-decode.c:892:25: return_function: returning to ‘parse_common_event’ from ‘json_object_add_value_string’ nvme-cli-2.13/redhat-linux-build/../plugins/ocp/ocp-telemetry-decode.c:894:25: call_function: calling ‘json_add_formatted_var_size_str’ from ‘parse_common_event’ #argument 1 of ‘__builtin_strcat’ must be non-null # 473| for (size_t i = 0; i < data_size; ++i) { # 474| sprintf(temp_buffer, "%02X", pdata[i]); # 475|-> strcat(description_str, temp_buffer); # 476| } # 477| Error: CPPCHECK_WARNING (CWE-476): [#def3] nvme-cli-2.13/util/utils.c:149: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: description_str # 147| for (size_t i = 0; i < data_size; ++i) { # 148| sprintf(temp_buffer, "%02X", pdata[i]); # 149|-> strcat(description_str, temp_buffer); # 150| } # 151|
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
diffbase-analyzer-version-clippy | 1.86.0 |
diffbase-analyzer-version-cppcheck | 2.17.1 |
diffbase-analyzer-version-gcc | 15.0.1 |
diffbase-analyzer-version-gcc-analyzer | 15.0.1 |
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-124.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.20250425.124705.g1c7c448.main-1.el9.noarch |
diffbase-mock-config | fedora-rawhide-x86_64 |
diffbase-project-name | nvme-cli-2.12-1.fc42 |
diffbase-store-results-to | /tmp/tmpum4e8isn/nvme-cli-2.12-1.fc42.tar.xz |
diffbase-time-created | 2025-04-25 14:32:13 |
diffbase-time-finished | 2025-04-25 14:35:07 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpum4e8isn/nvme-cli-2.12-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpum4e8isn/nvme-cli-2.12-1.fc42.src.rpm' |
diffbase-tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-124.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.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | nvme-cli-2.13-1.fc43 |
store-results-to | /tmp/tmpc5z_homa/nvme-cli-2.13-1.fc43.tar.xz |
time-created | 2025-04-25 14:35:19 |
time-finished | 2025-04-25 14:37:47 |
title | Newly introduced findings |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpc5z_homa/nvme-cli-2.13-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpc5z_homa/nvme-cli-2.13-1.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |