Newly introduced findings

List of Findings

Error: CPPCHECK_WARNING (CWE-476): [#def1]
serd-0.32.6/src/reader.c:105: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: reader
#  103|     memcpy(buf, str, n_bytes + 1);
#  104|   
#  105|->   const Ref ref = (Ref)((uint8_t*)node - reader->stack.buf);
#  106|   
#  107|   #ifdef SERD_STACK_CHECK

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
serd-0.32.6/test/test_reader_writer.c:134:26: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
serd-0.32.6/test/test_reader_writer.c:294:1: enter_function: entry to ‘main’
serd-0.32.6/test/test_reader_writer.c:308:43: acquire_memory: allocated here
serd-0.32.6/test/test_reader_writer.c:309:3: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
serd-0.32.6/test/test_reader_writer.c:311:3: branch_false: ...to here
serd-0.32.6/test/test_reader_writer.c:315:3: call_function: calling ‘test_write_errors’ from ‘main’
#  132|     serd_reader_set_error_sink(reader, quiet_error_sink, NULL);
#  133|   
#  134|->   const SerdStatus rst = serd_reader_read_string(reader, USTR(doc_string));
#  135|     const SerdStatus wst = serd_writer_finish(writer);
#  136|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
serd-0.32.6/test/test_reader_writer.c:135:26: warning[-Wanalyzer-malloc-leak]: leak of ‘path’
serd-0.32.6/test/test_reader_writer.c:294:1: enter_function: entry to ‘main’
serd-0.32.6/test/test_reader_writer.c:308:43: acquire_memory: allocated here
serd-0.32.6/test/test_reader_writer.c:309:3: branch_false: following ‘false’ branch (when ‘path’ is non-NULL)...
serd-0.32.6/test/test_reader_writer.c:311:3: branch_false: ...to here
serd-0.32.6/test/test_reader_writer.c:315:3: call_function: calling ‘test_write_errors’ from ‘main’
#  133|   
#  134|     const SerdStatus rst = serd_reader_read_string(reader, USTR(doc_string));
#  135|->   const SerdStatus wst = serd_writer_finish(writer);
#  136|   
#  137|     serd_reader_free(reader);

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.0
diffbase-analyzer-version-gcc-analyzer16.0.0
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-181.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameserd-0.32.4-2.fc43
diffbase-store-results-to/tmp/tmpfaipg0_2/serd-0.32.4-2.fc43.tar.xz
diffbase-time-created2026-01-08 21:42:54
diffbase-time-finished2026-01-08 21:44:52
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpfaipg0_2/serd-0.32.4-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpfaipg0_2/serd-0.32.4-2.fc43.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-181.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameserd-0.32.6-1.fc44
store-results-to/tmp/tmpybpoyxi_/serd-0.32.6-1.fc44.tar.xz
time-created2026-01-08 21:45:17
time-finished2026-01-08 21:46:47
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpybpoyxi_/serd-0.32.6-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpybpoyxi_/serd-0.32.6-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9