sord-0.16.20-1.fc44

List of Findings

Error: COMPILER_WARNING: [#def1] [important]
sord-0.16.20/include/sord/sord.h:11:10: error[fatal error]: serd/serd.h: No such file or directory
#    9|   #define SORD_SORD_H
#   10|   
#   11|-> #include <serd/serd.h>
#   12|   
#   13|   #include <stdbool.h>

Error: CPPCHECK_WARNING (CWE-476): [#def2]
sord-0.16.20/src/sord.c:158: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dup
#  156|   {
#  157|     uint8_t* dup = (uint8_t*)malloc(len + 1);
#  158|->   memcpy(dup, str, len + 1);
#  159|     return dup;
#  160|   }

Error: CPPCHECK_WARNING (CWE-476): [#def3]
sord-0.16.20/src/sord.c:231: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: world
#  229|   {
#  230|     SordWorld* world    = (SordWorld*)malloc(sizeof(SordWorld));
#  231|->   world->error_sink   = NULL;
#  232|     world->error_handle = NULL;
#  233|   

Error: CPPCHECK_WARNING (CWE-476): [#def4]
sord-0.16.20/src/sord.c:232: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: world
#  230|     SordWorld* world    = (SordWorld*)malloc(sizeof(SordWorld));
#  231|     world->error_sink   = NULL;
#  232|->   world->error_handle = NULL;
#  233|   
#  234|     world->nodes = zix_hash_new(

Error: CPPCHECK_WARNING (CWE-476): [#def5]
sord-0.16.20/src/sord.c:234: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: world
#  232|     world->error_handle = NULL;
#  233|   
#  234|->   world->nodes = zix_hash_new(
#  235|       NULL, sord_node_record_key, sord_node_hash, sord_node_hash_equal);
#  236|   

Error: CPPCHECK_WARNING (CWE-476): [#def6]
sord-0.16.20/src/sord.c:460: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: iter
#  458|   {
#  459|     SordIter* iter    = (SordIter*)malloc(sizeof(SordIter));
#  460|->   iter->sord        = sord;
#  461|     iter->cur         = cur;
#  462|     iter->order       = order;

Error: CPPCHECK_WARNING (CWE-476): [#def7]
sord-0.16.20/src/sord.c:461: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: iter
#  459|     SordIter* iter    = (SordIter*)malloc(sizeof(SordIter));
#  460|     iter->sord        = sord;
#  461|->   iter->cur         = cur;
#  462|     iter->order       = order;
#  463|     iter->mode        = mode;

Error: CPPCHECK_WARNING (CWE-476): [#def8]
sord-0.16.20/src/sord.c:462: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: iter
#  460|     iter->sord        = sord;
#  461|     iter->cur         = cur;
#  462|->   iter->order       = order;
#  463|     iter->mode        = mode;
#  464|     iter->n_prefix    = n_prefix;

Error: CPPCHECK_WARNING (CWE-476): [#def9]
sord-0.16.20/src/sord.c:463: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: iter
#  461|     iter->cur         = cur;
#  462|     iter->order       = order;
#  463|->   iter->mode        = mode;
#  464|     iter->n_prefix    = n_prefix;
#  465|     iter->end         = false;

Error: CPPCHECK_WARNING (CWE-476): [#def10]
sord-0.16.20/src/sord.c:464: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: iter
#  462|     iter->order       = order;
#  463|     iter->mode        = mode;
#  464|->   iter->n_prefix    = n_prefix;
#  465|     iter->end         = false;
#  466|     iter->skip_graphs = order < GSPO;

Error: CPPCHECK_WARNING (CWE-476): [#def11]
sord-0.16.20/src/sord.c:465: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: iter
#  463|     iter->mode        = mode;
#  464|     iter->n_prefix    = n_prefix;
#  465|->   iter->end         = false;
#  466|     iter->skip_graphs = order < GSPO;
#  467|     for (uint8_t i = 0U; i < TUP_LEN; ++i) {

Error: CPPCHECK_WARNING (CWE-476): [#def12]
sord-0.16.20/src/sord.c:466: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: iter
#  464|     iter->n_prefix    = n_prefix;
#  465|     iter->end         = false;
#  466|->   iter->skip_graphs = order < GSPO;
#  467|     for (uint8_t i = 0U; i < TUP_LEN; ++i) {
#  468|       iter->pat[i] = pat[i];

Error: CPPCHECK_WARNING (CWE-476): [#def13]
sord-0.16.20/src/sord.c:468: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: iter
#  466|     iter->skip_graphs = order < GSPO;
#  467|     for (uint8_t i = 0U; i < TUP_LEN; ++i) {
#  468|->     iter->pat[i] = pat[i];
#  469|     }
#  470|   

Error: CPPCHECK_WARNING (CWE-476): [#def14]
sord-0.16.20/src/sord.c:471: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: iter
#  469|     }
#  470|   
#  471|->   switch (iter->mode) {
#  472|     case ALL:
#  473|     case SINGLE:

Error: CPPCHECK_WARNING (CWE-476): [#def15]
sord-0.16.20/src/sord.c:719: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: model
#  717|   
#  718|     SordModel* model = (SordModel*)malloc(sizeof(struct SordModelImpl));
#  719|->   model->world     = world;
#  720|     model->n_quads   = 0;
#  721|     model->n_iters   = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def16]
sord-0.16.20/src/sord.c:720: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: model
#  718|     SordModel* model = (SordModel*)malloc(sizeof(struct SordModelImpl));
#  719|     model->world     = world;
#  720|->   model->n_quads   = 0;
#  721|     model->n_iters   = 0;
#  722|   

Error: CPPCHECK_WARNING (CWE-476): [#def17]
sord-0.16.20/src/sord.c:721: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: model
#  719|     model->world     = world;
#  720|     model->n_quads   = 0;
#  721|->   model->n_iters   = 0;
#  722|   
#  723|     for (unsigned i = 0; i < half; ++i) {

Error: CPPCHECK_WARNING (CWE-476): [#def18]
sord-0.16.20/src/sord.c:739: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: model
#  737|     }
#  738|   
#  739|->   if (!model->indices[DEFAULT_ORDER]) {
#  740|       model->indices[DEFAULT_ORDER] =
#  741|         zix_btree_new(NULL, sord_quad_compare, (void*)orderings[DEFAULT_ORDER]);

Error: CPPCHECK_WARNING (CWE-476): [#def19]
sord-0.16.20/src/sord.c:1235: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
# 1233|       const size_t uri_len = uri_prefix.len + uri_suffix.len;
# 1234|       uint8_t*     buf     = (uint8_t*)malloc(uri_len + 1);
# 1235|->     memcpy(buf, uri_prefix.buf, uri_prefix.len);
# 1236|       memcpy(buf + uri_prefix.len, uri_suffix.buf, uri_suffix.len);
# 1237|       buf[uri_len] = '\0';

Error: CPPCHECK_WARNING (CWE-682): [#def20]
sord-0.16.20/src/sord.c:1236: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 1234|       uint8_t*     buf     = (uint8_t*)malloc(uri_len + 1);
# 1235|       memcpy(buf, uri_prefix.buf, uri_prefix.len);
# 1236|->     memcpy(buf + uri_prefix.len, uri_suffix.buf, uri_suffix.len);
# 1237|       buf[uri_len] = '\0';
# 1238|   

Error: CPPCHECK_WARNING (CWE-476): [#def21]
sord-0.16.20/src/sord.c:1237: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
# 1235|       memcpy(buf, uri_prefix.buf, uri_prefix.len);
# 1236|       memcpy(buf + uri_prefix.len, uri_suffix.buf, uri_suffix.len);
# 1237|->     buf[uri_len] = '\0';
# 1238|   
# 1239|       ret =

Error: CPPCHECK_WARNING (CWE-476): [#def22]
sord-0.16.20/src/sord.c:1299: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: quad
# 1297|   
# 1298|     const SordNode** quad = (const SordNode**)malloc(sizeof(SordQuad));
# 1299|->   memcpy(quad, tup, sizeof(SordQuad));
# 1300|   
# 1301|     for (unsigned i = 0; i < NUM_ORDERS; ++i) {

Error: COMPILER_WARNING: [#def23] [important]
sord-0.16.20/src/sord_internal.h:7:10: error[fatal error]: serd/serd.h: No such file or directory
#    5|   #define SORD_SORD_INTERNAL_H
#    6|   
#    7|-> #include <serd/serd.h>
#    8|   #include <sord/sord.h>
#    9|   

Error: COMPILER_WARNING: [#def24] [important]
sord-0.16.20/src/sord_validate.c:6:10: error[fatal error]: serd/serd.h: No such file or directory
#    4|   #include "sord_config.h"
#    5|   
#    6|-> #include <serd/serd.h>
#    7|   #include <sord/sord.h>
#    8|   #include <zix/allocator.h>

Error: COMPILER_WARNING: [#def25] [important]
sord-0.16.20/src/sordi.c:6:10: error[fatal error]: serd/serd.h: No such file or directory
#    4|   #include "sord_config.h"
#    5|   
#    6|-> #include <serd/serd.h>
#    7|   #include <sord/sord.h>
#    8|   #include <zix/allocator.h>

Error: COMPILER_WARNING: [#def26] [important]
sord-0.16.20/src/syntax.c:4:10: error[fatal error]: serd/serd.h: No such file or directory
#    2|   // SPDX-License-Identifier: ISC
#    3|   
#    4|-> #include <serd/serd.h>
#    5|   #include <sord/sord.h>
#    6|   

Error: CPPCHECK_WARNING (CWE-476): [#def27]
sord-0.16.20/src/syntax.c:21: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: inserter
#   19|   {
#   20|     SordInserter* inserter = (SordInserter*)malloc(sizeof(SordInserter));
#   21|->   inserter->model        = model;
#   22|     inserter->env          = env;
#   23|     return inserter;

Error: CPPCHECK_WARNING (CWE-476): [#def28]
sord-0.16.20/src/syntax.c:22: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: inserter
#   20|     SordInserter* inserter = (SordInserter*)malloc(sizeof(SordInserter));
#   21|     inserter->model        = model;
#   22|->   inserter->env          = env;
#   23|     return inserter;
#   24|   }

Error: COMPILER_WARNING: [#def29] [important]
sord-0.16.20/test/test_sord.c:4:10: error[fatal error]: serd/serd.h: No such file or directory
#    2|   // SPDX-License-Identifier: ISC
#    3|   
#    4|-> #include <serd/serd.h>
#    5|   #include <sord/sord.h>
#    6|   

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
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-233.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-namesord-0.16.20-1.fc44
store-results-to/tmp/tmp_9o0gl2a/sord-0.16.20-1.fc44.tar.xz
time-created2026-01-08 21:47:12
time-finished2026-01-08 21:48:35
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp_9o0gl2a/sord-0.16.20-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp_9o0gl2a/sord-0.16.20-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9