Error: COMPILER_WARNING (CWE-252): [#def1] libcbor-0.13.0/examples/cbor_sequence.c: scope_hint: In function ‘read_cbor_sequence’ libcbor-0.13.0/examples/cbor_sequence.c:68:3: warning[-Wunused-result]: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ # 68 | fread(buffer, 1, file_size, file); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 66| } # 67| # 68|-> fread(buffer, 1, file_size, file); # 69| fclose(file); # 70| Error: CPPCHECK_WARNING (CWE-476): [#def2] libcbor-0.13.0/examples/readfile.c:29: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buffer # 27| fseek(f, 0, SEEK_SET); # 28| unsigned char* buffer = malloc(length); # 29|-> fread(buffer, length, 1, f); # 30| # 31| /* Assuming `buffer` contains `length` bytes of input data */ Error: COMPILER_WARNING (CWE-252): [#def3] libcbor-0.13.0/examples/readfile.c: scope_hint: In function ‘main’ libcbor-0.13.0/examples/readfile.c:29:3: warning[-Wunused-result]: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ # 29 | fread(buffer, length, 1, f); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ # 27| fseek(f, 0, SEEK_SET); # 28| unsigned char* buffer = malloc(length); # 29|-> fread(buffer, length, 1, f); # 30| # 31| /* Assuming `buffer` contains `length` bytes of input data */ Error: COMPILER_WARNING (CWE-252): [#def4] libcbor-0.13.0/examples/streaming_array.c: scope_hint: In function ‘main’ libcbor-0.13.0/examples/streaming_array.c:34:3: warning[-Wunused-result]: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ # 34 | scanf(argv[1], "%zu", &n); # | ^~~~~~~~~~~~~~~~~~~~~~~~~ # 32| if (argc != 2) usage(); # 33| size_t n; # 34|-> scanf(argv[1], "%zu", &n); # 35| out = freopen(NULL, "wb", stdout); # 36| if (!out) exit(1); Error: CPPCHECK_WARNING (CWE-476): [#def5] libcbor-0.13.0/examples/streaming_parser.c:44: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buffer # 42| fseek(f, 0, SEEK_SET); # 43| unsigned char* buffer = malloc(length); # 44|-> fread(buffer, length, 1, f); # 45| # 46| struct cbor_callbacks callbacks = cbor_empty_callbacks; Error: COMPILER_WARNING (CWE-252): [#def6] libcbor-0.13.0/examples/streaming_parser.c: scope_hint: In function ‘main’ libcbor-0.13.0/examples/streaming_parser.c:44:3: warning[-Wunused-result]: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ # 44 | fread(buffer, length, 1, f); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ # 42| fseek(f, 0, SEEK_SET); # 43| unsigned char* buffer = malloc(length); # 44|-> fread(buffer, length, 1, f); # 45| # 46| struct cbor_callbacks callbacks = cbor_empty_callbacks; Error: CPPCHECK_WARNING (CWE-682): [#def7] libcbor-0.13.0/examples/streaming_parser.c:51: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 49| callbacks.string = find_string; # 50| while (bytes_read < length) { # 51|-> decode_result = cbor_stream_decode(buffer + bytes_read, length - bytes_read, # 52| &callbacks, NULL); # 53| bytes_read += decode_result.read;
| analyzer-version-clippy | 1.95.0 |
| analyzer-version-cppcheck | 2.20.0 |
| analyzer-version-gcc | 16.1.1 |
| analyzer-version-gcc-analyzer | 16.1.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.95.0 |
| diffbase-analyzer-version-cppcheck | 2.20.0 |
| diffbase-analyzer-version-gcc | 16.1.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.1.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-150.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.20260524.213755.g3c6d0be.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | libcbor-0.14.0-2.fc45 |
| diffbase-store-results-to | /tmp/tmp0g5sto6c/libcbor-0.14.0-2.fc45.tar.xz |
| diffbase-time-created | 2026-06-01 14:15:09 |
| diffbase-time-finished | 2026-06-01 14:16:35 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmp0g5sto6c/libcbor-0.14.0-2.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp0g5sto6c/libcbor-0.14.0-2.fc45.src.rpm' |
| diffbase-tool-version | csmock-3.8.5.20260529.133039.g6f3b5c6-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-150.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.20260524.213755.g3c6d0be.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | libcbor-0.13.0-2.fc44 |
| store-results-to | /tmp/tmpzknw2cig/libcbor-0.13.0-2.fc44.tar.xz |
| time-created | 2026-06-01 14:12:46 |
| time-finished | 2026-06-01 14:14:45 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpzknw2cig/libcbor-0.13.0-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpzknw2cig/libcbor-0.13.0-2.fc44.src.rpm' |
| tool-version | csmock-3.8.5.20260529.133039.g6f3b5c6-1.el9 |