lilv-0.26.2-1.fc44

List of Findings

Error: CPPCHECK_WARNING (CWE-476): [#def1]
lilv-0.26.2/src/instance.c:46: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: local_features
#   44|     if (features == NULL) {
#   45|       local_features    = (const LV2_Feature**)malloc(sizeof(LV2_Feature*));
#   46|->     local_features[0] = NULL;
#   47|     }
#   48|   

Error: CPPCHECK_WARNING (CWE-476): [#def2]
lilv-0.26.2/src/instance.c:63: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#   61|         // Create LilvInstance to return
#   62|         result                 = (LilvInstance*)malloc(sizeof(LilvInstance));
#   63|->       result->lv2_descriptor = ld;
#   64|         result->lv2_handle     = ld->instantiate(
#   65|           ld, sample_rate, bundle_path, (features) ? features : local_features);

Error: CPPCHECK_WARNING (CWE-476): [#def3]
lilv-0.26.2/src/instance.c:64: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#   62|         result                 = (LilvInstance*)malloc(sizeof(LilvInstance));
#   63|         result->lv2_descriptor = ld;
#   64|->       result->lv2_handle     = ld->instantiate(
#   65|           ld, sample_rate, bundle_path, (features) ? features : local_features);
#   66|         result->pimpl = lib;

Error: CPPCHECK_WARNING (CWE-476): [#def4]
lilv-0.26.2/src/instance.c:66: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#   64|         result->lv2_handle     = ld->instantiate(
#   65|           ld, sample_rate, bundle_path, (features) ? features : local_features);
#   66|->       result->pimpl = lib;
#   67|         break;
#   68|       }

Error: CPPCHECK_WARNING (CWE-476): [#def5]
lilv-0.26.2/src/lib.c:72: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: llib
#   70|   
#   71|     LilvLib* llib        = (LilvLib*)malloc(sizeof(LilvLib));
#   72|->   llib->world          = world;
#   73|     llib->uri            = lilv_node_duplicate(uri);
#   74|     llib->bundle_path    = lilv_strdup(bundle_path);

Error: CPPCHECK_WARNING (CWE-476): [#def6]
lilv-0.26.2/src/lib.c:73: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: llib
#   71|     LilvLib* llib        = (LilvLib*)malloc(sizeof(LilvLib));
#   72|     llib->world          = world;
#   73|->   llib->uri            = lilv_node_duplicate(uri);
#   74|     llib->bundle_path    = lilv_strdup(bundle_path);
#   75|     llib->lib            = lib;

Error: CPPCHECK_WARNING (CWE-476): [#def7]
lilv-0.26.2/src/lib.c:74: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: llib
#   72|     llib->world          = world;
#   73|     llib->uri            = lilv_node_duplicate(uri);
#   74|->   llib->bundle_path    = lilv_strdup(bundle_path);
#   75|     llib->lib            = lib;
#   76|     llib->lv2_descriptor = df;

Error: CPPCHECK_WARNING (CWE-476): [#def8]
lilv-0.26.2/src/lib.c:75: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: llib
#   73|     llib->uri            = lilv_node_duplicate(uri);
#   74|     llib->bundle_path    = lilv_strdup(bundle_path);
#   75|->   llib->lib            = lib;
#   76|     llib->lv2_descriptor = df;
#   77|     llib->desc           = desc;

Error: CPPCHECK_WARNING (CWE-476): [#def9]
lilv-0.26.2/src/lib.c:76: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: llib
#   74|     llib->bundle_path    = lilv_strdup(bundle_path);
#   75|     llib->lib            = lib;
#   76|->   llib->lv2_descriptor = df;
#   77|     llib->desc           = desc;
#   78|     llib->refs           = 1;

Error: CPPCHECK_WARNING (CWE-476): [#def10]
lilv-0.26.2/src/lib.c:77: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: llib
#   75|     llib->lib            = lib;
#   76|     llib->lv2_descriptor = df;
#   77|->   llib->desc           = desc;
#   78|     llib->refs           = 1;
#   79|   

Error: CPPCHECK_WARNING (CWE-476): [#def11]
lilv-0.26.2/src/lib.c:78: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: llib
#   76|     llib->lv2_descriptor = df;
#   77|     llib->desc           = desc;
#   78|->   llib->refs           = 1;
#   79|   
#   80|     zix_tree_insert(world->libs, llib, NULL);

Error: COMPILER_WARNING: [#def12] [important]
lilv-0.26.2/src/load_skimmer.h:7:10: error[fatal error]: serd/serd.h: No such file or directory
#    5|   #define LILV_LOAD_SKIMMER_H
#    6|   
#    7|-> #include <serd/serd.h>
#    8|   #include <sord/sord.h>
#    9|   #include <zix/attributes.h>

Error: CPPCHECK_WARNING (CWE-476): [#def13]
lilv-0.26.2/src/node.c:62: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: val
#   60|   {
#   61|     LilvNode* val = (LilvNode*)malloc(sizeof(LilvNode));
#   62|->   val->world    = world;
#   63|     val->type     = type;
#   64|   

Error: CPPCHECK_WARNING (CWE-476): [#def14]
lilv-0.26.2/src/node.c:63: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: val
#   61|     LilvNode* val = (LilvNode*)malloc(sizeof(LilvNode));
#   62|     val->world    = world;
#   63|->   val->type     = type;
#   64|   
#   65|     const uint8_t* ustr = (const uint8_t*)str;

Error: CPPCHECK_WARNING (CWE-476): [#def15]
lilv-0.26.2/src/node.c:117: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  115|     case SORD_URI:
#  116|       result        = (LilvNode*)malloc(sizeof(LilvNode));
#  117|->     result->world = world;
#  118|       result->type  = LILV_VALUE_URI;
#  119|       result->node  = sord_node_copy(node);

Error: CPPCHECK_WARNING (CWE-476): [#def16]
lilv-0.26.2/src/node.c:118: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  116|       result        = (LilvNode*)malloc(sizeof(LilvNode));
#  117|       result->world = world;
#  118|->     result->type  = LILV_VALUE_URI;
#  119|       result->node  = sord_node_copy(node);
#  120|       break;

Error: CPPCHECK_WARNING (CWE-476): [#def17]
lilv-0.26.2/src/node.c:119: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  117|       result->world = world;
#  118|       result->type  = LILV_VALUE_URI;
#  119|->     result->node  = sord_node_copy(node);
#  120|       break;
#  121|     case SORD_BLANK:

Error: CPPCHECK_WARNING (CWE-476): [#def18]
lilv-0.26.2/src/node.c:123: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  121|     case SORD_BLANK:
#  122|       result        = (LilvNode*)malloc(sizeof(LilvNode));
#  123|->     result->world = world;
#  124|       result->type  = LILV_VALUE_BLANK;
#  125|       result->node  = sord_node_copy(node);

Error: CPPCHECK_WARNING (CWE-476): [#def19]
lilv-0.26.2/src/node.c:124: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  122|       result        = (LilvNode*)malloc(sizeof(LilvNode));
#  123|       result->world = world;
#  124|->     result->type  = LILV_VALUE_BLANK;
#  125|       result->node  = sord_node_copy(node);
#  126|       break;

Error: CPPCHECK_WARNING (CWE-476): [#def20]
lilv-0.26.2/src/node.c:125: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  123|       result->world = world;
#  124|       result->type  = LILV_VALUE_BLANK;
#  125|->     result->node  = sord_node_copy(node);
#  126|       break;
#  127|     case SORD_LITERAL:

Error: CPPCHECK_WARNING (CWE-476): [#def21]
lilv-0.26.2/src/node.c:231: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  229|   
#  230|     LilvNode* result = (LilvNode*)malloc(sizeof(LilvNode));
#  231|->   result->world    = val->world;
#  232|     result->node     = sord_node_copy(val->node);
#  233|     result->val      = val->val;

Error: CPPCHECK_WARNING (CWE-476): [#def22]
lilv-0.26.2/src/node.c:232: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  230|     LilvNode* result = (LilvNode*)malloc(sizeof(LilvNode));
#  231|     result->world    = val->world;
#  232|->   result->node     = sord_node_copy(val->node);
#  233|     result->val      = val->val;
#  234|     result->type     = val->type;

Error: CPPCHECK_WARNING (CWE-476): [#def23]
lilv-0.26.2/src/node.c:233: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  231|     result->world    = val->world;
#  232|     result->node     = sord_node_copy(val->node);
#  233|->   result->val      = val->val;
#  234|     result->type     = val->type;
#  235|     return result;

Error: CPPCHECK_WARNING (CWE-476): [#def24]
lilv-0.26.2/src/node.c:234: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  232|     result->node     = sord_node_copy(val->node);
#  233|     result->val      = val->val;
#  234|->   result->type     = val->type;
#  235|     return result;
#  236|   }

Error: CPPCHECK_WARNING (CWE-476): [#def25]
lilv-0.26.2/src/node.c:287: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  285|       len    = strlen(str) + 3;
#  286|       result = (char*)calloc(len, 1);
#  287|->     snprintf(result, len, "<%s>", str);
#  288|       break;
#  289|     case LILV_VALUE_BLANK:

Error: CPPCHECK_WARNING (CWE-476): [#def26]
lilv-0.26.2/src/node.c:292: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  290|       len    = strlen(str) + 3;
#  291|       result = (char*)calloc(len, 1);
#  292|->     snprintf(result, len, "_:%s", str);
#  293|       break;
#  294|     case LILV_VALUE_STRING:

Error: COMPILER_WARNING: [#def27] [important]
lilv-0.26.2/src/node_hash.h:7:10: error[fatal error]: zix/allocator.h: No such file or directory
#    5|   #define LILV_NODE_HASH_H
#    6|   
#    7|-> #include <zix/allocator.h>
#    8|   #include <zix/attributes.h>
#    9|   #include <zix/status.h>

Error: CPPCHECK_WARNING (CWE-476): [#def28]
lilv-0.26.2/src/plugin.c:32: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: plugin
#   30|   lilv_plugin_init(LilvPlugin* plugin, LilvNode* bundle_uri)
#   31|   {
#   32|->   plugin->bundle_uri = bundle_uri;
#   33|     plugin->binary_uri = NULL;
#   34|   #ifdef LILV_DYN_MANIFEST

Error: CPPCHECK_WARNING (CWE-476): [#def29]
lilv-0.26.2/src/plugin.c:33: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: plugin
#   31|   {
#   32|     plugin->bundle_uri = bundle_uri;
#   33|->   plugin->binary_uri = NULL;
#   34|   #ifdef LILV_DYN_MANIFEST
#   35|     plugin->dynmanifest = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def30]
lilv-0.26.2/src/plugin.c:37: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: plugin
#   35|     plugin->dynmanifest = NULL;
#   36|   #endif
#   37|->   plugin->plugin_class = NULL;
#   38|     plugin->data_uris    = lilv_nodes_new();
#   39|     plugin->ports        = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def31]
lilv-0.26.2/src/plugin.c:38: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: plugin
#   36|   #endif
#   37|     plugin->plugin_class = NULL;
#   38|->   plugin->data_uris    = lilv_nodes_new();
#   39|     plugin->ports        = NULL;
#   40|     plugin->num_ports    = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def32]
lilv-0.26.2/src/plugin.c:39: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: plugin
#   37|     plugin->plugin_class = NULL;
#   38|     plugin->data_uris    = lilv_nodes_new();
#   39|->   plugin->ports        = NULL;
#   40|     plugin->num_ports    = 0;
#   41|     plugin->loaded       = false;

Error: CPPCHECK_WARNING (CWE-476): [#def33]
lilv-0.26.2/src/plugin.c:40: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: plugin
#   38|     plugin->data_uris    = lilv_nodes_new();
#   39|     plugin->ports        = NULL;
#   40|->   plugin->num_ports    = 0;
#   41|     plugin->loaded       = false;
#   42|     plugin->parse_errors = false;

Error: CPPCHECK_WARNING (CWE-476): [#def34]
lilv-0.26.2/src/plugin.c:41: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: plugin
#   39|     plugin->ports        = NULL;
#   40|     plugin->num_ports    = 0;
#   41|->   plugin->loaded       = false;
#   42|     plugin->parse_errors = false;
#   43|   }

Error: CPPCHECK_WARNING (CWE-476): [#def35]
lilv-0.26.2/src/plugin.c:42: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: plugin
#   40|     plugin->num_ports    = 0;
#   41|     plugin->loaded       = false;
#   42|->   plugin->parse_errors = false;
#   43|   }
#   44|   

Error: CPPCHECK_WARNING (CWE-476): [#def36]
lilv-0.26.2/src/plugin.c:51: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: plugin
#   49|     LilvPlugin* plugin = (LilvPlugin*)malloc(sizeof(LilvPlugin));
#   50|   
#   51|->   plugin->world      = world;
#   52|     plugin->plugin_uri = uri;
#   53|   

Error: CPPCHECK_WARNING (CWE-476): [#def37]
lilv-0.26.2/src/plugin.c:52: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: plugin
#   50|   
#   51|     plugin->world      = world;
#   52|->   plugin->plugin_uri = uri;
#   53|   
#   54|     lilv_plugin_init(plugin, bundle_uri);

Error: CPPCHECK_WARNING (CWE-401): [#def38]
lilv-0.26.2/src/plugin.c:581: error[memleakOnRealloc]: Common realloc mistake: 'classes' nulled but not freed upon failure
#  579|     const LilvNode** classes   = NULL;
#  580|     for (LilvNode* c = NULL; (c = va_arg(args, LilvNode*));) {
#  581|->     classes =
#  582|         (const LilvNode**)realloc(classes, ++n_classes * sizeof(LilvNode*));
#  583|       classes[n_classes - 1] = c;

Error: CPPCHECK_WARNING (CWE-476): [#def39]
lilv-0.26.2/src/pluginclass.c:20: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pc
#   18|   {
#   19|     LilvPluginClass* pc = (LilvPluginClass*)malloc(sizeof(LilvPluginClass));
#   20|->   pc->world           = world;
#   21|     pc->uri             = uri;
#   22|     pc->label           = lilv_node_new(world, LILV_VALUE_STRING, label);

Error: CPPCHECK_WARNING (CWE-476): [#def40]
lilv-0.26.2/src/pluginclass.c:21: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pc
#   19|     LilvPluginClass* pc = (LilvPluginClass*)malloc(sizeof(LilvPluginClass));
#   20|     pc->world           = world;
#   21|->   pc->uri             = uri;
#   22|     pc->label           = lilv_node_new(world, LILV_VALUE_STRING, label);
#   23|     pc->parent_uri =

Error: CPPCHECK_WARNING (CWE-476): [#def41]
lilv-0.26.2/src/pluginclass.c:22: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pc
#   20|     pc->world           = world;
#   21|     pc->uri             = uri;
#   22|->   pc->label           = lilv_node_new(world, LILV_VALUE_STRING, label);
#   23|     pc->parent_uri =
#   24|       (parent_node ? lilv_node_new_from_node(world, parent_node) : NULL);

Error: CPPCHECK_WARNING (CWE-476): [#def42]
lilv-0.26.2/src/pluginclass.c:23: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pc
#   21|     pc->uri             = uri;
#   22|     pc->label           = lilv_node_new(world, LILV_VALUE_STRING, label);
#   23|->   pc->parent_uri =
#   24|       (parent_node ? lilv_node_new_from_node(world, parent_node) : NULL);
#   25|     return pc;

Error: CPPCHECK_WARNING (CWE-476): [#def43]
lilv-0.26.2/src/port.c:25: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: port
#   23|   {
#   24|     LilvPort* port = (LilvPort*)malloc(sizeof(LilvPort));
#   25|->   port->node     = lilv_node_new_from_node(world, node);
#   26|     port->index    = index;
#   27|     port->symbol   = lilv_node_new(world, LILV_VALUE_STRING, symbol);

Error: CPPCHECK_WARNING (CWE-476): [#def44]
lilv-0.26.2/src/port.c:26: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: port
#   24|     LilvPort* port = (LilvPort*)malloc(sizeof(LilvPort));
#   25|     port->node     = lilv_node_new_from_node(world, node);
#   26|->   port->index    = index;
#   27|     port->symbol   = lilv_node_new(world, LILV_VALUE_STRING, symbol);
#   28|     port->classes  = lilv_nodes_new();

Error: CPPCHECK_WARNING (CWE-476): [#def45]
lilv-0.26.2/src/port.c:27: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: port
#   25|     port->node     = lilv_node_new_from_node(world, node);
#   26|     port->index    = index;
#   27|->   port->symbol   = lilv_node_new(world, LILV_VALUE_STRING, symbol);
#   28|     port->classes  = lilv_nodes_new();
#   29|     return port;

Error: CPPCHECK_WARNING (CWE-476): [#def46]
lilv-0.26.2/src/port.c:28: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: port
#   26|     port->index    = index;
#   27|     port->symbol   = lilv_node_new(world, LILV_VALUE_STRING, symbol);
#   28|->   port->classes  = lilv_nodes_new();
#   29|     return port;
#   30|   }

Error: CPPCHECK_WARNING (CWE-476): [#def47]
lilv-0.26.2/src/scalepoint.c:17: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: point
#   15|   {
#   16|     LilvScalePoint* point = (LilvScalePoint*)malloc(sizeof(LilvScalePoint));
#   17|->   point->value          = lilv_node_new_from_node(world, value);
#   18|     point->label          = lilv_node_new_from_node(world, label);
#   19|     return point;

Error: CPPCHECK_WARNING (CWE-476): [#def48]
lilv-0.26.2/src/scalepoint.c:18: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: point
#   16|     LilvScalePoint* point = (LilvScalePoint*)malloc(sizeof(LilvScalePoint));
#   17|     point->value          = lilv_node_new_from_node(world, value);
#   18|->   point->label          = lilv_node_new_from_node(world, label);
#   19|     return point;
#   20|   }

Error: CPPCHECK_WARNING (CWE-476): [#def49]
lilv-0.26.2/src/state.c:143: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pv->atom
#  141|       pv->symbol     = lilv_strdup(port_symbol);
#  142|       pv->atom       = (LV2_Atom*)malloc(sizeof(LV2_Atom) + size);
#  143|->     pv->atom->size = size;
#  144|       pv->atom->type = type;
#  145|       memcpy(pv->atom + 1, value, size);

Error: CPPCHECK_WARNING (CWE-476): [#def50]
lilv-0.26.2/src/state.c:351: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pm
#  349|     // Add record to path mapping
#  350|     PathMap* pm = (PathMap*)malloc(sizeof(PathMap));
#  351|->   pm->abs     = real_path;
#  352|     pm->rel     = lilv_strdup(path);
#  353|     zix_tree_insert(state->abs2rel, pm, NULL);

Error: CPPCHECK_WARNING (CWE-476): [#def51]
lilv-0.26.2/src/state.c:352: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pm
#  350|     PathMap* pm = (PathMap*)malloc(sizeof(PathMap));
#  351|     pm->abs     = real_path;
#  352|->   pm->rel     = lilv_strdup(path);
#  353|     zix_tree_insert(state->abs2rel, pm, NULL);
#  354|     zix_tree_insert(state->rel2abs, pm, NULL);

Error: CPPCHECK_WARNING (CWE-476): [#def52]
lilv-0.26.2/src/state.c:402: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  400|   
#  401|     if (features) {
#  402|->     memcpy(ret, features, n_features * sizeof(LV2_Feature*));
#  403|     }
#  404|   

Error: CPPCHECK_WARNING (CWE-476): [#def53]
lilv-0.26.2/src/state.c:407: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  405|     size_t i = n_features;
#  406|     if (map) {
#  407|->     ret[i++] = map;
#  408|     }
#  409|     if (make) {

Error: CPPCHECK_WARNING (CWE-476): [#def54]
lilv-0.26.2/src/state.c:410: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  408|     }
#  409|     if (make) {
#  410|->     ret[i++] = make;
#  411|     }
#  412|     if (free) {

Error: CPPCHECK_WARNING (CWE-476): [#def55]
lilv-0.26.2/src/state.c:413: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  411|     }
#  412|     if (free) {
#  413|->     ret[i++] = free;
#  414|     }
#  415|   

Error: CPPCHECK_WARNING (CWE-476): [#def56]
lilv-0.26.2/src/state.c:473: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  471|     LilvWorld* const    world     = plugin->world;
#  472|     LilvState* const    state     = (LilvState*)calloc(1, sizeof(LilvState));
#  473|->   state->plugin_uri  = lilv_node_duplicate(lilv_plugin_get_uri(plugin));
#  474|     state->abs2rel     = zix_tree_new(NULL, false, abs_cmp, NULL, map_free, NULL);
#  475|     state->rel2abs     = zix_tree_new(NULL, false, rel_cmp, NULL, NULL, NULL);

Error: CPPCHECK_WARNING (CWE-476): [#def57]
lilv-0.26.2/src/state.c:474: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  472|     LilvState* const    state     = (LilvState*)calloc(1, sizeof(LilvState));
#  473|     state->plugin_uri  = lilv_node_duplicate(lilv_plugin_get_uri(plugin));
#  474|->   state->abs2rel     = zix_tree_new(NULL, false, abs_cmp, NULL, map_free, NULL);
#  475|     state->rel2abs     = zix_tree_new(NULL, false, rel_cmp, NULL, NULL, NULL);
#  476|     state->scratch_dir = scratch_dir ? normal_dir(scratch_dir) : NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def58]
lilv-0.26.2/src/state.c:475: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  473|     state->plugin_uri  = lilv_node_duplicate(lilv_plugin_get_uri(plugin));
#  474|     state->abs2rel     = zix_tree_new(NULL, false, abs_cmp, NULL, map_free, NULL);
#  475|->   state->rel2abs     = zix_tree_new(NULL, false, rel_cmp, NULL, NULL, NULL);
#  476|     state->scratch_dir = scratch_dir ? normal_dir(scratch_dir) : NULL;
#  477|     state->copy_dir    = copy_dir ? normal_dir(copy_dir) : NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def59]
lilv-0.26.2/src/state.c:476: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  474|     state->abs2rel     = zix_tree_new(NULL, false, abs_cmp, NULL, map_free, NULL);
#  475|     state->rel2abs     = zix_tree_new(NULL, false, rel_cmp, NULL, NULL, NULL);
#  476|->   state->scratch_dir = scratch_dir ? normal_dir(scratch_dir) : NULL;
#  477|     state->copy_dir    = copy_dir ? normal_dir(copy_dir) : NULL;
#  478|     state->link_dir    = link_dir ? normal_dir(link_dir) : NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def60]
lilv-0.26.2/src/state.c:477: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  475|     state->rel2abs     = zix_tree_new(NULL, false, rel_cmp, NULL, NULL, NULL);
#  476|     state->scratch_dir = scratch_dir ? normal_dir(scratch_dir) : NULL;
#  477|->   state->copy_dir    = copy_dir ? normal_dir(copy_dir) : NULL;
#  478|     state->link_dir    = link_dir ? normal_dir(link_dir) : NULL;
#  479|     state->dir         = save_dir ? normal_dir(save_dir) : NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def61]
lilv-0.26.2/src/state.c:478: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  476|     state->scratch_dir = scratch_dir ? normal_dir(scratch_dir) : NULL;
#  477|     state->copy_dir    = copy_dir ? normal_dir(copy_dir) : NULL;
#  478|->   state->link_dir    = link_dir ? normal_dir(link_dir) : NULL;
#  479|     state->dir         = save_dir ? normal_dir(save_dir) : NULL;
#  480|     state->atom_Path   = map->map(map->handle, LV2_ATOM__Path);

Error: CPPCHECK_WARNING (CWE-476): [#def62]
lilv-0.26.2/src/state.c:479: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  477|     state->copy_dir    = copy_dir ? normal_dir(copy_dir) : NULL;
#  478|     state->link_dir    = link_dir ? normal_dir(link_dir) : NULL;
#  479|->   state->dir         = save_dir ? normal_dir(save_dir) : NULL;
#  480|     state->atom_Path   = map->map(map->handle, LV2_ATOM__Path);
#  481|   

Error: CPPCHECK_WARNING (CWE-476): [#def63]
lilv-0.26.2/src/state.c:480: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  478|     state->link_dir    = link_dir ? normal_dir(link_dir) : NULL;
#  479|     state->dir         = save_dir ? normal_dir(save_dir) : NULL;
#  480|->   state->atom_Path   = map->map(map->handle, LV2_ATOM__Path);
#  481|   
#  482|     LV2_State_Map_Path  pmap          = {state, abstract_path, absolute_path};

Error: CPPCHECK_WARNING (CWE-476): [#def64]
lilv-0.26.2/src/state.c:623: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  621|     // Allocate state
#  622|     LilvState* const state = (LilvState*)calloc(1, sizeof(LilvState));
#  623|->   state->dir             = dir ? zix_path_join(NULL, dir, NULL) : NULL;
#  624|     state->atom_Path       = map->map(map->handle, LV2_ATOM__Path);
#  625|     state->uri             = lilv_node_new_from_node(world, node);

Error: CPPCHECK_WARNING (CWE-476): [#def65]
lilv-0.26.2/src/state.c:624: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  622|     LilvState* const state = (LilvState*)calloc(1, sizeof(LilvState));
#  623|     state->dir             = dir ? zix_path_join(NULL, dir, NULL) : NULL;
#  624|->   state->atom_Path       = map->map(map->handle, LV2_ATOM__Path);
#  625|     state->uri             = lilv_node_new_from_node(world, node);
#  626|   

Error: CPPCHECK_WARNING (CWE-476): [#def66]
lilv-0.26.2/src/state.c:625: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  623|     state->dir             = dir ? zix_path_join(NULL, dir, NULL) : NULL;
#  624|     state->atom_Path       = map->map(map->handle, LV2_ATOM__Path);
#  625|->   state->uri             = lilv_node_new_from_node(world, node);
#  626|   
#  627|     // Get the plugin URI this state applies to

Error: CPPCHECK_WARNING (CWE-476): [#def67]
lilv-0.26.2/src/string_util.c:28: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#   26|     char*  result = (char*)malloc(len + 1);
#   27|   
#   28|->   memcpy(result, first, len);
#   29|   
#   30|     va_list args; // NOLINT(cppcoreguidelines-init-variables)

Error: CPPCHECK_WARNING (CWE-476): [#def68]
lilv-0.26.2/src/string_util.c:66: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: copy
#   64|     const size_t len  = strlen(str);
#   65|     char*        copy = (char*)malloc(len + 1);
#   66|->   memcpy(copy, str, len + 1);
#   67|     return copy;
#   68|   }

Error: COMPILER_WARNING: [#def69] [important]
lilv-0.26.2/src/string_util.h:7:10: error[fatal error]: sord/sord.h: No such file or directory
#    5|   #define LILV_STRING_UTIL_H
#    6|   
#    7|-> #include <sord/sord.h>
#    8|   #include <zix/string_view.h>
#    9|   

Error: COMPILER_WARNING: [#def70] [important]
lilv-0.26.2/src/syntax_skimmer.h:7:10: error[fatal error]: serd/serd.h: No such file or directory
#    5|   #define LILV_SYNTAX_SKIMMER_H
#    6|   
#    7|-> #include <serd/serd.h>
#    8|   #include <sord/sord.h>
#    9|   #include <zix/allocator.h>

Error: CPPCHECK_WARNING (CWE-476): [#def71]
lilv-0.26.2/src/sys_util.c:67: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: path
#   65|     const size_t in_path_len = strlen(in_path);
#   66|     char*        path        = (char*)malloc(in_path_len + 7);
#   67|->   memcpy(path, in_path, in_path_len + 1);
#   68|   
#   69|     for (unsigned i = 2U; i < 1000000U; ++i) {

Error: COMPILER_WARNING: [#def72] [important]
lilv-0.26.2/src/sys_util.h:7:10: error[fatal error]: zix/attributes.h: No such file or directory
#    5|   #define LILV_SYS_UTIL_H
#    6|   
#    7|-> #include <zix/attributes.h>
#    8|   
#    9|   #include <stdbool.h>

Error: CPPCHECK_WARNING (CWE-476): [#def73]
lilv-0.26.2/src/ui.c:27: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ui
#   25|   
#   26|     LilvUI* ui     = (LilvUI*)malloc(sizeof(LilvUI));
#   27|->   ui->world      = world;
#   28|     ui->uri        = lilv_node_new_from_node(world, uri);
#   29|     ui->binary_uri = lilv_node_new_from_node(world, binary_uri);

Error: CPPCHECK_WARNING (CWE-476): [#def74]
lilv-0.26.2/src/ui.c:28: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ui
#   26|     LilvUI* ui     = (LilvUI*)malloc(sizeof(LilvUI));
#   27|     ui->world      = world;
#   28|->   ui->uri        = lilv_node_new_from_node(world, uri);
#   29|     ui->binary_uri = lilv_node_new_from_node(world, binary_uri);
#   30|   

Error: CPPCHECK_WARNING (CWE-476): [#def75]
lilv-0.26.2/src/ui.c:29: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ui
#   27|     ui->world      = world;
#   28|     ui->uri        = lilv_node_new_from_node(world, uri);
#   29|->   ui->binary_uri = lilv_node_new_from_node(world, binary_uri);
#   30|   
#   31|     // FIXME: kludge

Error: CPPCHECK_WARNING (CWE-476): [#def76]
lilv-0.26.2/src/ui.c:32: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ui
#   30|   
#   31|     // FIXME: kludge
#   32|->   char* bundle     = lilv_strdup(lilv_node_as_string(ui->binary_uri));
#   33|     char* last_slash = strrchr(bundle, '/') + 1;
#   34|     *last_slash      = '\0';

Error: CPPCHECK_WARNING (CWE-476): [#def77]
lilv-0.26.2/src/ui.c:35: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ui
#   33|     char* last_slash = strrchr(bundle, '/') + 1;
#   34|     *last_slash      = '\0';
#   35|->   ui->bundle_uri   = lilv_new_uri(world, bundle);
#   36|     free(bundle);
#   37|   

Error: CPPCHECK_WARNING (CWE-476): [#def78]
lilv-0.26.2/src/ui.c:38: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ui
#   36|     free(bundle);
#   37|   
#   38|->   ui->classes = lilv_nodes_new();
#   39|     zix_tree_insert(
#   40|       (ZixTree*)ui->classes, lilv_node_new_from_node(world, type_uri), NULL);

Error: CPPCHECK_WARNING (CWE-476): [#def79]
lilv-0.26.2/src/ui.c:40: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ui
#   38|     ui->classes = lilv_nodes_new();
#   39|     zix_tree_insert(
#   40|->     (ZixTree*)ui->classes, lilv_node_new_from_node(world, type_uri), NULL);
#   41|   
#   42|     return ui;

Error: COMPILER_WARNING: [#def80] [important]
lilv-0.26.2/src/uris.h:7:10: error[fatal error]: sord/sord.h: No such file or directory
#    5|   #define LILV_URIS_H
#    6|   
#    7|-> #include <sord/sord.h>
#    8|   #include <zix/attributes.h>
#    9|   

Error: CPPCHECK_WARNING (CWE-476): [#def81]
lilv-0.26.2/src/world.c:50: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: world
#   48|     LilvWorld* world = (LilvWorld*)calloc(1, sizeof(LilvWorld));
#   49|   
#   50|->   world->world = sord_world_new();
#   51|     if (!world->world) {
#   52|       goto fail;

Error: CPPCHECK_WARNING (CWE-476): [#def82]
lilv-0.26.2/src/world.c:51: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: world
#   49|   
#   50|     world->world = sord_world_new();
#   51|->   if (!world->world) {
#   52|       goto fail;
#   53|     }

Error: CPPCHECK_WARNING (CWE-476): [#def83]
lilv-0.26.2/src/world.c:387: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: spec
#  385|   {
#  386|     LilvSpec* spec  = (LilvSpec*)malloc(sizeof(LilvSpec));
#  387|->   spec->spec      = sord_node_copy(specification_node);
#  388|     spec->bundle    = sord_node_copy(bundle_node);
#  389|     spec->data_uris = lilv_nodes_new();

Error: CPPCHECK_WARNING (CWE-476): [#def84]
lilv-0.26.2/src/world.c:388: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: spec
#  386|     LilvSpec* spec  = (LilvSpec*)malloc(sizeof(LilvSpec));
#  387|     spec->spec      = sord_node_copy(specification_node);
#  388|->   spec->bundle    = sord_node_copy(bundle_node);
#  389|     spec->data_uris = lilv_nodes_new();
#  390|   

Error: CPPCHECK_WARNING (CWE-476): [#def85]
lilv-0.26.2/src/world.c:389: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: spec
#  387|     spec->spec      = sord_node_copy(specification_node);
#  388|     spec->bundle    = sord_node_copy(bundle_node);
#  389|->   spec->data_uris = lilv_nodes_new();
#  390|   
#  391|     // Add all data files (rdfs:seeAlso)

Error: CPPCHECK_WARNING (CWE-476): [#def86]
lilv-0.26.2/src/world.c:393: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: spec
#  391|     // Add all data files (rdfs:seeAlso)
#  392|     lilv_world_collect_data_files(
#  393|->     world, specification_node, (ZixTree*)spec->data_uris);
#  394|   
#  395|     // Add specification to world specification list

Error: CPPCHECK_WARNING (CWE-476): [#def87]
lilv-0.26.2/src/world.c:396: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: spec
#  394|   
#  395|     // Add specification to world specification list
#  396|->   spec->next   = world->specs;
#  397|     world->specs = spec;
#  398|   }

Error: CPPCHECK_WARNING (CWE-476): [#def88]
lilv-0.26.2/src/world.c:1037: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dir
# 1035|         const size_t dir_len = sep - lv2_path;
# 1036|         char* const  dir     = (char*)malloc(dir_len + 1);
# 1037|->       memcpy(dir, lv2_path, dir_len);
# 1038|         dir[dir_len] = '\0';
# 1039|         lilv_world_load_directory(world, dir);

Error: CPPCHECK_WARNING (CWE-476): [#def89]
lilv-0.26.2/src/world.c:1038: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dir
# 1036|         char* const  dir     = (char*)malloc(dir_len + 1);
# 1037|         memcpy(dir, lv2_path, dir_len);
# 1038|->       dir[dir_len] = '\0';
# 1039|         lilv_world_load_directory(world, dir);
# 1040|         free(dir);

Error: COMPILER_WARNING: [#def90] [important]
lilv-0.26.2/test/lilv_test_uri_map.h:8:10: error[fatal error]: serd/serd.h: No such file or directory
#    6|   
#    7|   #include <lv2/urid/urid.h>
#    8|-> #include <serd/serd.h>
#    9|   
#   10|   #include <assert.h>

Error: COMPILER_WARNING: [#def91] [important]
lilv-0.26.2/test/lilv_test_utils.h:8:10: error[fatal error]: zix/attributes.h: No such file or directory
#    6|   
#    7|   #include <lilv/lilv.h>
#    8|-> #include <zix/attributes.h>
#    9|   
#   10|   #define MANIFEST_PREFIXES \

Error: COMPILER_WARNING: [#def92] [important]
lilv-0.26.2/test/test_plugin.lv2/test_plugin.c:8:10: error[fatal error]: zix/filesystem.h: No such file or directory
#    6|   #include <lv2/state/state.h>
#    7|   #include <lv2/urid/urid.h>
#    8|-> #include <zix/filesystem.h>
#    9|   #include <zix/path.h>
#   10|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
lilv-0.26.2/tools/lv2apply.c:139:3: warning[-Wanalyzer-malloc-leak]: leak of ‘values’
lilv-0.26.2/tools/lv2apply.c:138:27: acquire_memory: allocated here
lilv-0.26.2/tools/lv2apply.c:139:3: throw: if ‘lilv_plugin_get_port_ranges_float’ throws an exception...
lilv-0.26.2/tools/lv2apply.c:139:3: danger: ‘values’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  137|     /* Get default values for all ports */
#  138|     float* values = (float*)calloc(n_ports, sizeof(float));
#  139|->   lilv_plugin_get_port_ranges_float(self->plugin, NULL, NULL, values);
#  140|   
#  141|     LilvNode* lv2_InputPort   = lilv_new_uri(world, LV2_CORE__InputPort);

Error: CPPCHECK_WARNING (CWE-476): [#def94]
lilv-0.26.2/tools/lv2apply.c:154: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: values
#  152|       port->lilv_port = lport;
#  153|       port->index     = i;
#  154|->     port->value     = isnan(values[i]) ? 0.0f : values[i];
#  155|       port->optional =
#  156|         lilv_port_has_property(self->plugin, lport, lv2_connectionOptional);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
lilv-0.26.2/tools/lv2info.c:305:3: warning[-Wanalyzer-malloc-leak]: leak of ‘defaults’
lilv-0.26.2/tools/lv2info.c:304:38: acquire_memory: allocated here
lilv-0.26.2/tools/lv2info.c:305:3: throw: if ‘lilv_plugin_get_port_ranges_float’ throws an exception...
lilv-0.26.2/tools/lv2info.c:305:3: danger: ‘defaults’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  303|     float*         maxes     = (float*)calloc(num_ports, sizeof(float));
#  304|     float*         defaults  = (float*)calloc(num_ports, sizeof(float));
#  305|->   lilv_plugin_get_port_ranges_float(p, mins, maxes, defaults);
#  306|   
#  307|     for (uint32_t i = 0; i < num_ports; ++i) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
lilv-0.26.2/tools/lv2info.c:305:3: warning[-Wanalyzer-malloc-leak]: leak of ‘maxes’
lilv-0.26.2/tools/lv2info.c:303:38: acquire_memory: allocated here
lilv-0.26.2/tools/lv2info.c:305:3: throw: if ‘lilv_plugin_get_port_ranges_float’ throws an exception...
lilv-0.26.2/tools/lv2info.c:305:3: danger: ‘maxes’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  303|     float*         maxes     = (float*)calloc(num_ports, sizeof(float));
#  304|     float*         defaults  = (float*)calloc(num_ports, sizeof(float));
#  305|->   lilv_plugin_get_port_ranges_float(p, mins, maxes, defaults);
#  306|   
#  307|     for (uint32_t i = 0; i < num_ports; ++i) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
lilv-0.26.2/tools/lv2info.c:305:3: warning[-Wanalyzer-malloc-leak]: leak of ‘mins’
lilv-0.26.2/tools/lv2info.c:302:38: acquire_memory: allocated here
lilv-0.26.2/tools/lv2info.c:305:3: throw: if ‘lilv_plugin_get_port_ranges_float’ throws an exception...
lilv-0.26.2/tools/lv2info.c:305:3: danger: ‘mins’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  303|     float*         maxes     = (float*)calloc(num_ports, sizeof(float));
#  304|     float*         defaults  = (float*)calloc(num_ports, sizeof(float));
#  305|->   lilv_plugin_get_port_ranges_float(p, mins, maxes, defaults);
#  306|   
#  307|     for (uint32_t i = 0; i < num_ports; ++i) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def98]
lilv-0.26.2/tools/lv2info.c:400:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(plugin_file, "a")’
lilv-0.26.2/tools/lv2info.c:342:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
lilv-0.26.2/tools/lv2info.c:342:6: branch_false: ...to here
lilv-0.26.2/tools/lv2info.c:349:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
lilv-0.26.2/tools/lv2info.c:350:21: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:350:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:355:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:361:15: branch_true: following ‘true’ branch (when the strings are equal)...
lilv-0.26.2/tools/lv2info.c:362:7: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:349:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
lilv-0.26.2/tools/lv2info.c:350:21: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:350:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:355:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:359:8: branch_true: following ‘true’ branch (when the strings are equal)...
lilv-0.26.2/tools/lv2info.c:360:7: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:377:6: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:383:25: branch_false: ...to here
lilv-0.26.2/tools/lv2info.c:395:6: branch_true: following ‘true’ branch...
lilv-0.26.2/tools/lv2info.c:396:22: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:398:23: acquire_resource: opened here
lilv-0.26.2/tools/lv2info.c:399:8: branch_true: following ‘true’ branch...
lilv-0.26.2/tools/lv2info.c:400:7: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:400:7: throw: if ‘lilv_plugin_write_description’ throws an exception...
lilv-0.26.2/tools/lv2info.c:400:7: danger: ‘fopen(plugin_file, "a")’ leaks here; was opened at [(23)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/22)
#  398|       FILE* plugin_fd = fopen(plugin_file, "a");
#  399|       if (plugin_fd) {
#  400|->       lilv_plugin_write_description(world, p, base, plugin_fd);
#  401|         fclose(plugin_fd);
#  402|       } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
lilv-0.26.2/tools/lv2info.c:400:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(plugin_file, "a")’
lilv-0.26.2/tools/lv2info.c:342:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
lilv-0.26.2/tools/lv2info.c:342:6: branch_false: ...to here
lilv-0.26.2/tools/lv2info.c:349:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
lilv-0.26.2/tools/lv2info.c:350:21: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:350:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:355:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:361:15: branch_true: following ‘true’ branch (when the strings are equal)...
lilv-0.26.2/tools/lv2info.c:362:7: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:349:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
lilv-0.26.2/tools/lv2info.c:350:21: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:350:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:355:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:359:8: branch_true: following ‘true’ branch (when the strings are equal)...
lilv-0.26.2/tools/lv2info.c:360:7: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:377:6: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:383:25: branch_false: ...to here
lilv-0.26.2/tools/lv2info.c:395:6: branch_true: following ‘true’ branch...
lilv-0.26.2/tools/lv2info.c:396:22: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:398:23: acquire_memory: allocated here
lilv-0.26.2/tools/lv2info.c:399:8: branch_true: following ‘true’ branch...
lilv-0.26.2/tools/lv2info.c:400:7: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:400:7: throw: if ‘lilv_plugin_write_description’ throws an exception...
lilv-0.26.2/tools/lv2info.c:400:7: danger: ‘fopen(plugin_file, "a")’ leaks here; was allocated at [(23)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/22)
#  398|       FILE* plugin_fd = fopen(plugin_file, "a");
#  399|       if (plugin_fd) {
#  400|->       lilv_plugin_write_description(world, p, base, plugin_fd);
#  401|         fclose(plugin_fd);
#  402|       } else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def100]
lilv-0.26.2/tools/lv2info.c:409:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(manifest_file, "a")’
lilv-0.26.2/tools/lv2info.c:342:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
lilv-0.26.2/tools/lv2info.c:342:6: branch_false: ...to here
lilv-0.26.2/tools/lv2info.c:349:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
lilv-0.26.2/tools/lv2info.c:350:21: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:350:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:355:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:361:15: branch_true: following ‘true’ branch (when the strings are equal)...
lilv-0.26.2/tools/lv2info.c:362:7: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:349:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
lilv-0.26.2/tools/lv2info.c:350:21: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:350:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:355:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:359:8: branch_true: following ‘true’ branch (when the strings are equal)...
lilv-0.26.2/tools/lv2info.c:360:7: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:377:6: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:383:25: branch_false: ...to here
lilv-0.26.2/tools/lv2info.c:395:6: branch_true: following ‘true’ branch...
lilv-0.26.2/tools/lv2info.c:396:22: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:406:8: branch_true: following ‘true’ branch (when ‘manifest_file’ is non-NULL)...
lilv-0.26.2/tools/lv2info.c:407:27: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:407:27: acquire_resource: opened here
lilv-0.26.2/tools/lv2info.c:408:10: branch_true: following ‘true’ branch...
lilv-0.26.2/tools/lv2info.c:409:9: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:409:9: throw: if ‘lilv_plugin_write_manifest_entry’ throws an exception...
lilv-0.26.2/tools/lv2info.c:409:9: danger: ‘fopen(manifest_file, "a")’ leaks here; was opened at [(25)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/24)
#  407|         FILE* manifest_fd = fopen(manifest_file, "a");
#  408|         if (manifest_fd) {
#  409|->         lilv_plugin_write_manifest_entry(
#  410|             world, p, base, manifest_fd, plugin_file);
#  411|           fclose(manifest_fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def101]
lilv-0.26.2/tools/lv2info.c:409:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(manifest_file, "a")’
lilv-0.26.2/tools/lv2info.c:342:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
lilv-0.26.2/tools/lv2info.c:342:6: branch_false: ...to here
lilv-0.26.2/tools/lv2info.c:349:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
lilv-0.26.2/tools/lv2info.c:350:21: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:350:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:355:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:361:15: branch_true: following ‘true’ branch (when the strings are equal)...
lilv-0.26.2/tools/lv2info.c:362:7: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:349:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
lilv-0.26.2/tools/lv2info.c:350:21: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:350:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:355:8: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:359:8: branch_true: following ‘true’ branch (when the strings are equal)...
lilv-0.26.2/tools/lv2info.c:360:7: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:377:6: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2info.c:383:25: branch_false: ...to here
lilv-0.26.2/tools/lv2info.c:395:6: branch_true: following ‘true’ branch...
lilv-0.26.2/tools/lv2info.c:396:22: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:406:8: branch_true: following ‘true’ branch (when ‘manifest_file’ is non-NULL)...
lilv-0.26.2/tools/lv2info.c:407:27: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:407:27: acquire_memory: allocated here
lilv-0.26.2/tools/lv2info.c:408:10: branch_true: following ‘true’ branch...
lilv-0.26.2/tools/lv2info.c:409:9: branch_true: ...to here
lilv-0.26.2/tools/lv2info.c:409:9: throw: if ‘lilv_plugin_write_manifest_entry’ throws an exception...
lilv-0.26.2/tools/lv2info.c:409:9: danger: ‘fopen(manifest_file, "a")’ leaks here; was allocated at [(25)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/24)
#  407|         FILE* manifest_fd = fopen(manifest_file, "a");
#  408|         if (manifest_fd) {
#  409|->         lilv_plugin_write_manifest_entry(
#  410|             world, p, base, manifest_fd, plugin_file);
#  411|           fclose(manifest_fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
lilv-0.26.2/tools/uri_table.h:45:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
lilv-0.26.2/tools/lv2bench.c:327:1: enter_function: entry to ‘main’
lilv-0.26.2/tools/lv2bench.c:372:6: branch_false: following ‘false’ branch (when ‘<unknown>’ is NULL)...
lilv-0.26.2/tools/lv2bench.c:376:6: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:376:6: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
lilv-0.26.2/tools/lv2bench.c:382:28: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:406:5: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2bench.c:407:28: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:407:22: call_function: calling ‘bench’ from ‘main’
#   43|   
#   44|     const size_t len = strlen(uri);
#   45|->   table->uris = (char**)realloc(table->uris, ++table->n_uris * sizeof(char*));
#   46|     table->uris[table->n_uris - 1] = (char*)malloc(len + 1);
#   47|     memcpy(table->uris[table->n_uris - 1], uri, len + 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def103]
lilv-0.26.2/tools/uri_table.h:45:3: warning[-Wanalyzer-malloc-leak]: leak of ‘uri_table.uris’
lilv-0.26.2/tools/lv2bench.c:327:1: enter_function: entry to ‘main’
lilv-0.26.2/tools/lv2bench.c:372:6: branch_false: following ‘false’ branch (when ‘<unknown>’ is NULL)...
lilv-0.26.2/tools/lv2bench.c:376:6: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:376:6: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
lilv-0.26.2/tools/lv2bench.c:382:28: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:406:5: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2bench.c:407:28: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:407:22: call_function: calling ‘bench’ from ‘main’
#   43|   
#   44|     const size_t len = strlen(uri);
#   45|->   table->uris = (char**)realloc(table->uris, ++table->n_uris * sizeof(char*));
#   46|     table->uris[table->n_uris - 1] = (char*)malloc(len + 1);
#   47|     memcpy(table->uris[table->n_uris - 1], uri, len + 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
lilv-0.26.2/tools/uri_table.h:45:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
lilv-0.26.2/tools/lv2bench.c:327:1: enter_function: entry to ‘main’
lilv-0.26.2/tools/lv2bench.c:372:6: branch_false: following ‘false’ branch (when ‘<unknown>’ is NULL)...
lilv-0.26.2/tools/lv2bench.c:376:6: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:376:6: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
lilv-0.26.2/tools/lv2bench.c:382:28: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:406:5: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2bench.c:407:28: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:407:22: call_function: calling ‘bench’ from ‘main’
#   43|   
#   44|     const size_t len = strlen(uri);
#   45|->   table->uris = (char**)realloc(table->uris, ++table->n_uris * sizeof(char*));
#   46|     table->uris[table->n_uris - 1] = (char*)malloc(len + 1);
#   47|     memcpy(table->uris[table->n_uris - 1], uri, len + 1);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def105]
lilv-0.26.2/tools/uri_table.h:46:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
lilv-0.26.2/tools/lv2bench.c:327:1: enter_function: entry to ‘main’
lilv-0.26.2/tools/lv2bench.c:372:6: branch_false: following ‘false’ branch (when ‘<unknown>’ is NULL)...
lilv-0.26.2/tools/lv2bench.c:376:6: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:376:6: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
lilv-0.26.2/tools/lv2bench.c:382:28: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:406:5: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2bench.c:407:28: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:407:22: call_function: calling ‘bench’ from ‘main’
#   44|     const size_t len = strlen(uri);
#   45|     table->uris = (char**)realloc(table->uris, ++table->n_uris * sizeof(char*));
#   46|->   table->uris[table->n_uris - 1] = (char*)malloc(len + 1);
#   47|     memcpy(table->uris[table->n_uris - 1], uri, len + 1);
#   48|     return table->n_uris;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def106]
lilv-0.26.2/tools/uri_table.h:47:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc(len + 1)’ where non-null expected
lilv-0.26.2/tools/lv2bench.c:327:1: enter_function: entry to ‘main’
lilv-0.26.2/tools/lv2bench.c:372:6: branch_false: following ‘false’ branch (when ‘<unknown>’ is NULL)...
lilv-0.26.2/tools/lv2bench.c:376:6: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:376:6: branch_false: following ‘false’ branch (when ‘out’ is non-NULL)...
lilv-0.26.2/tools/lv2bench.c:382:28: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:406:5: branch_false: following ‘false’ branch...
lilv-0.26.2/tools/lv2bench.c:407:28: branch_false: ...to here
lilv-0.26.2/tools/lv2bench.c:407:22: call_function: calling ‘bench’ from ‘main’
#   45|     table->uris = (char**)realloc(table->uris, ++table->n_uris * sizeof(char*));
#   46|     table->uris[table->n_uris - 1] = (char*)malloc(len + 1);
#   47|->   memcpy(table->uris[table->n_uris - 1], uri, len + 1);
#   48|     return table->n_uris;
#   49|   }

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-175.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-namelilv-0.26.2-1.fc44
store-results-to/tmp/tmpiyk_n58l/lilv-0.26.2-1.fc44.tar.xz
time-created2026-01-08 19:23:08
time-finished2026-01-08 19:24:37
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpiyk_n58l/lilv-0.26.2-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpiyk_n58l/lilv-0.26.2-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9