lilv-0.24.26-2.fc43

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
lilv-0.24.26/redhat-linux-build/../src/instance.c:45:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘local_features’
lilv-0.24.26/redhat-linux-build/../src/instance.c:22:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/instance.c:27:38: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/instance.c:29:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/instance.c:34:5: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/instance.c:37:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/instance.c:43:6: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/instance.c:43:6: branch_true: following ‘true’ branch (when ‘features’ is NULL)...
lilv-0.24.26/redhat-linux-build/../src/instance.c:44:46: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/instance.c:44:46: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/instance.c:45:5: danger: ‘local_features’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#   43|     if (features == NULL) {
#   44|       local_features    = (const LV2_Feature**)malloc(sizeof(LV2_Feature*));
#   45|->     local_features[0] = NULL;
#   46|     }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
lilv-0.24.26/redhat-linux-build/../src/instance.c:62:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’
lilv-0.24.26/redhat-linux-build/../src/instance.c:22:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/instance.c:27:38: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/instance.c:29:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/instance.c:34:5: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/instance.c:37:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/instance.c:43:6: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/instance.c:43:6: branch_false: following ‘false’ branch (when ‘features’ is non-NULL)...
 branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/instance.c:51:8: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/instance.c:59:10: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/instance.c:61:47: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/instance.c:62:7: danger: ‘result’ could be NULL: unchecked value from [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#   60|         // Create LilvInstance to return
#   61|         result                 = (LilvInstance*)malloc(sizeof(LilvInstance));
#   62|->       result->lv2_descriptor = ld;
#   63|         result->lv2_handle     = ld->instantiate(
#   64|           ld, sample_rate, bundle_path, (features) ? features : local_features);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
lilv-0.24.26/redhat-linux-build/../src/lib.c:70:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘llib’
lilv-0.24.26/redhat-linux-build/../src/lib.c:24:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/lib.c:30:31: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/lib.c:33:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/lib.c:37:3: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/lib.c:39:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/lib.c:46:30: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/lib.c:52:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/lib.c:60:13: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/lib.c:60:13: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/lib.c:67:3: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/lib.c:69:36: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/lib.c:70:3: danger: ‘llib’ could be NULL: unchecked value from [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#   68|   
#   69|     LilvLib* llib        = (LilvLib*)malloc(sizeof(LilvLib));
#   70|->   llib->world          = world;
#   71|     llib->uri            = lilv_node_duplicate(uri);
#   72|     llib->bundle_path    = lilv_strdup(bundle_path);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
lilv-0.24.26/redhat-linux-build/../src/node.c:52:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘val’
lilv-0.24.26/redhat-linux-build/../src/node.c:51:30: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/node.c:52:3: danger: ‘val’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   50|   {
#   51|     LilvNode* val = (LilvNode*)malloc(sizeof(LilvNode));
#   52|->   val->world    = world;
#   53|     val->type     = type;
#   54|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
lilv-0.24.26/redhat-linux-build/../src/node.c:107:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’
lilv-0.24.26/redhat-linux-build/../src/node.c:96:6: branch_false: following ‘false’ branch (when ‘node’ is non-NULL)...
lilv-0.24.26/redhat-linux-build/../src/node.c:104:11: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/node.c:106:32: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/node.c:107:5: danger: ‘result’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  105|     case SORD_URI:
#  106|       result        = (LilvNode*)malloc(sizeof(LilvNode));
#  107|->     result->world = world;
#  108|       result->type  = LILV_VALUE_URI;
#  109|       result->node  = sord_node_copy(node);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
lilv-0.24.26/redhat-linux-build/../src/node.c:113:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’
lilv-0.24.26/redhat-linux-build/../src/node.c:96:6: branch_false: following ‘false’ branch (when ‘node’ is non-NULL)...
lilv-0.24.26/redhat-linux-build/../src/node.c:104:11: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/node.c:112:32: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/node.c:113:5: danger: ‘result’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  111|     case SORD_BLANK:
#  112|       result        = (LilvNode*)malloc(sizeof(LilvNode));
#  113|->     result->world = world;
#  114|       result->type  = LILV_VALUE_BLANK;
#  115|       result->node  = sord_node_copy(node);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
lilv-0.24.26/redhat-linux-build/../src/node.c:220:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’
lilv-0.24.26/redhat-linux-build/../src/node.c:215:6: branch_false: following ‘false’ branch (when ‘val’ is non-NULL)...
lilv-0.24.26/redhat-linux-build/../src/node.c:219:33: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/node.c:219:33: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/node.c:220:3: danger: ‘result’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  218|   
#  219|     LilvNode* result = (LilvNode*)malloc(sizeof(LilvNode));
#  220|->   result->world    = val->world;
#  221|     result->node     = sord_node_copy(val->node);
#  222|     result->val      = val->val;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
lilv-0.24.26/redhat-linux-build/../src/plugin.c:261:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*const_plugin.ports’
lilv-0.24.26/redhat-linux-build/../src/plugin.c:260:36: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/plugin.c:261:5: danger: ‘malloc(8)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  259|     if (!plugin->ports) {
#  260|       plugin->ports    = (LilvPort**)malloc(sizeof(LilvPort*));
#  261|->     plugin->ports[0] = NULL;
#  262|   
#  263|       SordIter* ports = lilv_world_query_internal(plugin->world,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
lilv-0.24.26/redhat-linux-build/../src/plugin.c:278:56: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
lilv-0.24.26/redhat-linux-build/../src/plugin.c:253:1: enter_function: entry to ‘lilv_plugin_load_ports_if_necessary’
lilv-0.24.26/redhat-linux-build/../src/plugin.c:268:5: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/plugin.c:269:30: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/plugin.c:272:9: call_function: calling ‘lilv_plugin_get_unique’ from ‘lilv_plugin_load_ports_if_necessary’
lilv-0.24.26/redhat-linux-build/../src/plugin.c:272:9: return_function: returning to ‘lilv_plugin_load_ports_if_necessary’ from ‘lilv_plugin_get_unique’
lilv-0.24.26/redhat-linux-build/../src/plugin.c:275:9: call_function: calling ‘lilv_plugin_get_unique’ from ‘lilv_plugin_load_ports_if_necessary’
lilv-0.24.26/redhat-linux-build/../src/plugin.c:275:9: return_function: returning to ‘lilv_plugin_load_ports_if_necessary’ from ‘lilv_plugin_get_unique’
lilv-0.24.26/redhat-linux-build/../src/plugin.c:277:10: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/plugin.c:278:56: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/plugin.c:278:56: danger: dereference of NULL ‘lilv_plugin_get_unique(const_plugin,  sord_iter_get_node(lilv_world_query_internal(*const_plugin.world, *MEM[(struct LilvPlugin *)const_plugin_2(D)].plugin_uri.node, *MEM[(struct LilvPlugin *)const_plugin_2(D)].world.uris.lv2_port, 0), 2), *MEM[(struct LilvPlugin *)const_plugin_2(D)].world.uris.lv2_symbol)’
#  276|   
#  277|         if (!lilv_node_is_string(symbol) ||
#  278|->           !is_symbol((const char*)sord_node_get_string(symbol->node))) {
#  279|           LILV_ERRORF("Plugin <%s> port symbol `%s' is invalid\n",
#  280|                       lilv_node_as_uri(plugin->plugin_uri),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
lilv-0.24.26/redhat-linux-build/../src/pluginclass.c:20:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pc’
lilv-0.24.26/redhat-linux-build/../src/pluginclass.c:19:43: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/pluginclass.c:20:3: danger: ‘pc’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   18|   {
#   19|     LilvPluginClass* pc = (LilvPluginClass*)malloc(sizeof(LilvPluginClass));
#   20|->   pc->world           = world;
#   21|     pc->uri             = lilv_node_new_from_node(world, uri);
#   22|     pc->label           = lilv_node_new(world, LILV_VALUE_STRING, label);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
lilv-0.24.26/redhat-linux-build/../src/port.c:26:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘port’
lilv-0.24.26/redhat-linux-build/../src/port.c:25:31: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/port.c:26:3: danger: ‘port’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   24|   {
#   25|     LilvPort* port = (LilvPort*)malloc(sizeof(LilvPort));
#   26|->   port->node     = lilv_node_new_from_node(world, node);
#   27|     port->index    = index;
#   28|     port->symbol   = lilv_node_new(world, LILV_VALUE_STRING, symbol);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
lilv-0.24.26/redhat-linux-build/../src/scalepoint.c:15:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘point’
lilv-0.24.26/redhat-linux-build/../src/scalepoint.c:14:44: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/scalepoint.c:15:3: danger: ‘point’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   13|   {
#   14|     LilvScalePoint* point = (LilvScalePoint*)malloc(sizeof(LilvScalePoint));
#   15|->   point->value          = value;
#   16|     point->label          = label;
#   17|     return point;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
lilv-0.24.26/redhat-linux-build/../src/state.c:134:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pv’
lilv-0.24.26/redhat-linux-build/../src/state.c:820:1: enter_function: entry to ‘lilv_state_new_from_string’
lilv-0.24.26/redhat-linux-build/../src/state.c:822:6: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
lilv-0.24.26/redhat-linux-build/../src/state.c:826:15: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/state.c:837:22: call_function: calling ‘new_state_from_model’ from ‘lilv_state_new_from_string’
#  132|   
#  133|       pv             = &state->values[state->n_values - 1];
#  134|->     pv->symbol     = lilv_strdup(port_symbol);
#  135|       pv->atom       = (LV2_Atom*)malloc(sizeof(LV2_Atom) + size);
#  136|       pv->atom->size = size;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
lilv-0.24.26/redhat-linux-build/../src/state.c:136:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc((long unsigned int)size + 8)’
lilv-0.24.26/redhat-linux-build/../src/state.c:820:1: enter_function: entry to ‘lilv_state_new_from_string’
lilv-0.24.26/redhat-linux-build/../src/state.c:822:6: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
lilv-0.24.26/redhat-linux-build/../src/state.c:826:15: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/state.c:837:22: call_function: calling ‘new_state_from_model’ from ‘lilv_state_new_from_string’
#  134|       pv->symbol     = lilv_strdup(port_symbol);
#  135|       pv->atom       = (LV2_Atom*)malloc(sizeof(LV2_Atom) + size);
#  136|->     pv->atom->size = size;
#  137|       pv->atom->type = type;
#  138|       memcpy(pv->atom + 1, value, size);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
lilv-0.24.26/redhat-linux-build/../src/state.c:169:5: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(size)’
lilv-0.24.26/redhat-linux-build/../src/state.c:197:1: enter_function: entry to ‘store_callback’
lilv-0.24.26/redhat-linux-build/../src/state.c:210:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/state.c:214:3: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/state.c:214:3: call_function: calling ‘append_property’ from ‘store_callback’
#  167|     if ((flags & LV2_STATE_IS_POD) || type == state->atom_Path) {
#  168|       prop->value = malloc(size);
#  169|->     memcpy(prop->value, value, size);
#  170|     } else {
#  171|       prop->value = (void*)value;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
lilv-0.24.26/redhat-linux-build/../src/state.c:616:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘state’
lilv-0.24.26/redhat-linux-build/../src/state.c:760:1: enter_function: entry to ‘lilv_state_new_from_file’
lilv-0.24.26/redhat-linux-build/../src/state.c:772:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/state.c:776:24: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/state.c:792:5: call_function: calling ‘new_state_from_model’ from ‘lilv_state_new_from_file’
#  614|     // Allocate state
#  615|     LilvState* const state = (LilvState*)calloc(1, sizeof(LilvState));
#  616|->   state->dir             = dir ? zix_path_join(NULL, dir, NULL) : NULL;
#  617|     state->atom_Path       = map->map(map->handle, LV2_ATOM__Path);
#  618|     state->uri             = lilv_node_new_from_node(world, node);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
lilv-0.24.26/redhat-linux-build/../src/state.c:724:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
lilv-0.24.26/redhat-linux-build/../src/state.c:820:1: enter_function: entry to ‘lilv_state_new_from_string’
lilv-0.24.26/redhat-linux-build/../src/state.c:822:6: branch_false: following ‘false’ branch (when ‘str’ is non-NULL)...
lilv-0.24.26/redhat-linux-build/../src/state.c:826:15: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/state.c:837:22: call_function: calling ‘new_state_from_model’ from ‘lilv_state_new_from_string’
#  722|           state->props.props = (Property*)realloc(
#  723|             state->props.props, (++state->props.n) * sizeof(Property));
#  724|->         state->props.props[state->props.n - 1] = prop;
#  725|         }
#  726|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def18]
lilv-0.24.26/redhat-linux-build/../src/ui.c:25:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ui’
lilv-0.24.26/redhat-linux-build/../src/ui.c:24:29: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/ui.c:25:3: danger: ‘ui’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   23|   
#   24|     LilvUI* ui     = (LilvUI*)malloc(sizeof(LilvUI));
#   25|->   ui->world      = world;
#   26|     ui->uri        = uri;
#   27|     ui->binary_uri = binary_uri;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
lilv-0.24.26/redhat-linux-build/../src/util.c:115:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘lang’
lilv-0.24.26/redhat-linux-build/../src/util.c:106:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:112:38: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/util.c:113:22: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:114:17: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:114:8: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:115:11: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:115:7: danger: ‘lang + i’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  113|     for (size_t i = 0; i < env_lang_len + 1; ++i) {
#  114|       if (env_lang[i] == '_') {
#  115|->       lang[i] = '-'; // Convert _ to -
#  116|       } else if (env_lang[i] >= 'A' && env_lang[i] <= 'Z') {
#  117|         lang[i] = env_lang[i] + ('a' - 'A'); // Convert to lowercase

Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
lilv-0.24.26/redhat-linux-build/../src/util.c:117:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘lang’
lilv-0.24.26/redhat-linux-build/../src/util.c:106:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:112:38: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/util.c:113:22: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:114:17: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:114:8: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:116:16: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:116:15: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:117:17: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:117:7: danger: ‘lang + i’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  115|         lang[i] = '-'; // Convert _ to -
#  116|       } else if (env_lang[i] >= 'A' && env_lang[i] <= 'Z') {
#  117|->       lang[i] = env_lang[i] + ('a' - 'A'); // Convert to lowercase
#  118|       } else if ((env_lang[i] >= 'a' && env_lang[i] <= 'z') ||
#  119|                  (env_lang[i] >= '0' && env_lang[i] <= '9')) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
lilv-0.24.26/redhat-linux-build/../src/util.c:120:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘lang’
lilv-0.24.26/redhat-linux-build/../src/util.c:106:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:112:38: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/util.c:113:22: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:114:17: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:114:8: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:116:16: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:116:15: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:118:16: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:118:15: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:120:11: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:120:7: danger: ‘lang + i’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  118|       } else if ((env_lang[i] >= 'a' && env_lang[i] <= 'z') ||
#  119|                  (env_lang[i] >= '0' && env_lang[i] <= '9')) {
#  120|->       lang[i] = env_lang[i]; // Lowercase letter or digit, copy verbatim
#  121|       } else if (env_lang[i] == '\0' || env_lang[i] == '.') {
#  122|         // End, or start of suffix (e.g. en_CA.utf-8), finished

Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
lilv-0.24.26/redhat-linux-build/../src/util.c:123:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘lang’
lilv-0.24.26/redhat-linux-build/../src/util.c:106:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:112:38: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/util.c:113:22: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:114:17: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:114:8: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:116:16: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:116:15: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:118:16: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:118:15: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:121:16: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:121:15: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/util.c:123:11: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/util.c:123:7: danger: ‘lang + i’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  121|       } else if (env_lang[i] == '\0' || env_lang[i] == '.') {
#  122|         // End, or start of suffix (e.g. en_CA.utf-8), finished
#  123|->       lang[i] = '\0';
#  124|         break;
#  125|       } else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
lilv-0.24.26/redhat-linux-build/../src/world.c:407:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘spec’
lilv-0.24.26/redhat-linux-build/../src/world.c:751:1: enter_function: entry to ‘lilv_world_load_bundle’
lilv-0.24.26/redhat-linux-build/../src/world.c:753:6: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/world.c:759:13: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/world.c:760:27: call_function: calling ‘lilv_world_get_manifest_uri’ from ‘lilv_world_load_bundle’
lilv-0.24.26/redhat-linux-build/../src/world.c:760:27: return_function: returning to ‘lilv_world_load_bundle’ from ‘lilv_world_get_manifest_uri’
lilv-0.24.26/redhat-linux-build/../src/world.c:761:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/world.c:766:19: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/world.c:767:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/world.c:775:44: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/world.c:867:41: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/world.c:869:39: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/world.c:870:5: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/world.c:871:30: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/world.c:872:7: call_function: calling ‘lilv_world_add_spec’ from ‘lilv_world_load_bundle’
#  405|   {
#  406|     LilvSpec* spec  = (LilvSpec*)malloc(sizeof(LilvSpec));
#  407|->   spec->spec      = sord_node_copy(specification_node);
#  408|     spec->bundle    = sord_node_copy(bundle_node);
#  409|     spec->data_uris = lilv_nodes_new();

Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
lilv-0.24.26/redhat-linux-build/../src/world.c:1255:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘sym’
lilv-0.24.26/redhat-linux-build/../src/world.c:1225:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/world.c:1231:8: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/world.c:1231:6: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/world.c:1237:34: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/world.c:1250:29: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/world.c:1251:22: branch_true: following ‘true’ branch (when ‘i < len’)...
lilv-0.24.26/redhat-linux-build/../src/world.c:1252:23: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/world.c:1253:8: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/world.c:1255:7: danger: ‘sym + i’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 1253|       if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_') ||
# 1254|             (i > 0 && c >= '0' && c <= '9'))) {
# 1255|->       sym[i] = '_';
# 1256|       } else {
# 1257|         sym[i] = str[i];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
lilv-0.24.26/redhat-linux-build/../src/world.c:1257:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘sym’
lilv-0.24.26/redhat-linux-build/../src/world.c:1225:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../src/world.c:1231:8: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../src/world.c:1231:6: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../src/world.c:1237:34: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/world.c:1250:29: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../src/world.c:1251:22: branch_true: following ‘true’ branch (when ‘i < len’)...
lilv-0.24.26/redhat-linux-build/../src/world.c:1252:23: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../src/world.c:1257:7: danger: ‘sym + i’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 1255|         sym[i] = '_';
# 1256|       } else {
# 1257|->       sym[i] = str[i];
# 1258|       }
# 1259|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
lilv-0.24.26/redhat-linux-build/../test/lilv_test_uri_map.h:24:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ctx’
lilv-0.24.26/redhat-linux-build/../test/test_state.c:1106:1: enter_function: entry to ‘main’
lilv-0.24.26/redhat-linux-build/../test/test_state.c:1108:3: call_function: calling ‘test_instance_state’ from ‘main’
#   22|   {
#   23|     map->uris   = NULL;
#   24|->   map->n_uris = 0;
#   25|   }
#   26|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
lilv-0.24.26/redhat-linux-build/../test/lilv_test_uri_map.h:54:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
lilv-0.24.26/redhat-linux-build/../test/test_state.c:1106:1: enter_function: entry to ‘main’
lilv-0.24.26/redhat-linux-build/../test/test_state.c:1108:3: call_function: calling ‘test_instance_state’ from ‘main’
#   52|   
#   53|     map->uris = (char**)realloc(map->uris, ++map->n_uris * sizeof(char*));
#   54|->   map->uris[map->n_uris - 1] = (char*)calloc(1, uri_len + 1);
#   55|     memcpy(map->uris[map->n_uris - 1], uri, uri_len + 1);
#   56|     return map->n_uris;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
lilv-0.24.26/redhat-linux-build/../test/lilv_test_utils.c:30:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘env’
lilv-0.24.26/redhat-linux-build/../test/lilv_test_utils.c:24:6: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../test/lilv_test_utils.c:28:36: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../test/lilv_test_utils.c:28:36: acquire_memory: this call could return NULL
lilv-0.24.26/redhat-linux-build/../test/lilv_test_utils.c:30:3: danger: ‘env’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   28|     LilvTestEnv* env = (LilvTestEnv*)calloc(1, sizeof(LilvTestEnv));
#   29|   
#   30|->   env->world       = world;
#   31|     env->plugin1_uri = lilv_new_uri(world, "http://example.org/plug");
#   32|     env->plugin2_uri = lilv_new_uri(world, "http://example.org/foobar");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:251:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:229:19: branch_true: following ‘true’ branch (when ‘i < argc’)...
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:230:21: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:230:8: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:236:8: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:241:8: branch_false: following ‘false’ branch (when the strings are non-equal)...
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:243:17: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:243:15: branch_false: following ‘false’ branch (when the strings are non-equal)...
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:245:17: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:245:15: branch_true: following ‘true’ branch (when the strings are equal)...
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:246:11: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:246:10: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:250:40: branch_false: ...to here
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:250:25: release_memory: ‘0’ is NULL
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:251:18: release_memory: ‘0’ is NULL
lilv-0.24.26/redhat-linux-build/../tools/lv2apply.c:251:7: danger: dereference of NULL ‘realloc(self.params, (long unsigned int)(self.n_params + 1) * 16) + (long unsigned int)self.n_params * 16’
#  249|         self.params =
#  250|           (Param*)realloc(self.params, ++self.n_params * sizeof(Param));
#  251|->       self.params[self.n_params - 1].sym   = argv[++i];
#  252|         self.params[self.n_params - 1].value = strtof(argv[++i], NULL);
#  253|       } else if (argv[i][0] == '-') {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def30]
lilv-0.24.26/redhat-linux-build/../tools/uri_table.h:52:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
lilv-0.24.26/redhat-linux-build/../tools/lv2bench.c:191:1: enter_function: entry to ‘main’
lilv-0.24.26/redhat-linux-build/../tools/lv2bench.c:198:8: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../tools/lv2bench.c:203:8: branch_false: following ‘false’ branch...
lilv-0.24.26/redhat-linux-build/../tools/lv2bench.c:220:15: branch_true: following ‘true’ branch...
lilv-0.24.26/redhat-linux-build/../tools/lv2bench.c:228:38: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../tools/lv2bench.c:228:38: branch_true: following ‘true’ branch (when ‘a < argc’)...
lilv-0.24.26/redhat-linux-build/../tools/lv2bench.c:228:55: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../tools/lv2bench.c:247:6: branch_true: following ‘true’ branch (when ‘plugin_uri_str’ is non-NULL)...
lilv-0.24.26/redhat-linux-build/../tools/lv2bench.c:248:21: branch_true: ...to here
lilv-0.24.26/redhat-linux-build/../tools/lv2bench.c:249:5: call_function: calling ‘bench’ from ‘main’
#   50|     const size_t len = strlen(uri);
#   51|     table->uris = (char**)realloc(table->uris, ++table->n_uris * sizeof(char*));
#   52|->   table->uris[table->n_uris - 1] = (char*)malloc(len + 1);
#   53|     memcpy(table->uris[table->n_uris - 1], uri, len + 1);
#   54|     return table->n_uris;

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

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

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

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

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

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

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

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

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

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

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

Error: CPPCHECK_WARNING (CWE-476): [#def42]
lilv-0.24.26/src/node.c:52: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: val
#   50|   {
#   51|     LilvNode* val = (LilvNode*)malloc(sizeof(LilvNode));
#   52|->   val->world    = world;
#   53|     val->type     = type;
#   54|   

Error: CPPCHECK_WARNING (CWE-476): [#def43]
lilv-0.24.26/src/node.c:53: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: val
#   51|     LilvNode* val = (LilvNode*)malloc(sizeof(LilvNode));
#   52|     val->world    = world;
#   53|->   val->type     = type;
#   54|   
#   55|     const uint8_t* ustr = (const uint8_t*)str;

Error: CPPCHECK_WARNING (CWE-476): [#def44]
lilv-0.24.26/src/node.c:107: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  105|     case SORD_URI:
#  106|       result        = (LilvNode*)malloc(sizeof(LilvNode));
#  107|->     result->world = world;
#  108|       result->type  = LILV_VALUE_URI;
#  109|       result->node  = sord_node_copy(node);

Error: CPPCHECK_WARNING (CWE-476): [#def45]
lilv-0.24.26/src/node.c:108: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  106|       result        = (LilvNode*)malloc(sizeof(LilvNode));
#  107|       result->world = world;
#  108|->     result->type  = LILV_VALUE_URI;
#  109|       result->node  = sord_node_copy(node);
#  110|       break;

Error: CPPCHECK_WARNING (CWE-476): [#def46]
lilv-0.24.26/src/node.c:109: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  107|       result->world = world;
#  108|       result->type  = LILV_VALUE_URI;
#  109|->     result->node  = sord_node_copy(node);
#  110|       break;
#  111|     case SORD_BLANK:

Error: CPPCHECK_WARNING (CWE-476): [#def47]
lilv-0.24.26/src/node.c:113: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  111|     case SORD_BLANK:
#  112|       result        = (LilvNode*)malloc(sizeof(LilvNode));
#  113|->     result->world = world;
#  114|       result->type  = LILV_VALUE_BLANK;
#  115|       result->node  = sord_node_copy(node);

Error: CPPCHECK_WARNING (CWE-476): [#def48]
lilv-0.24.26/src/node.c:114: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  112|       result        = (LilvNode*)malloc(sizeof(LilvNode));
#  113|       result->world = world;
#  114|->     result->type  = LILV_VALUE_BLANK;
#  115|       result->node  = sord_node_copy(node);
#  116|       break;

Error: CPPCHECK_WARNING (CWE-476): [#def49]
lilv-0.24.26/src/node.c:115: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  113|       result->world = world;
#  114|       result->type  = LILV_VALUE_BLANK;
#  115|->     result->node  = sord_node_copy(node);
#  116|       break;
#  117|     case SORD_LITERAL:

Error: CPPCHECK_WARNING (CWE-476): [#def50]
lilv-0.24.26/src/node.c:220: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  218|   
#  219|     LilvNode* result = (LilvNode*)malloc(sizeof(LilvNode));
#  220|->   result->world    = val->world;
#  221|     result->node     = sord_node_copy(val->node);
#  222|     result->val      = val->val;

Error: CPPCHECK_WARNING (CWE-476): [#def51]
lilv-0.24.26/src/node.c:221: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  219|     LilvNode* result = (LilvNode*)malloc(sizeof(LilvNode));
#  220|     result->world    = val->world;
#  221|->   result->node     = sord_node_copy(val->node);
#  222|     result->val      = val->val;
#  223|     result->type     = val->type;

Error: CPPCHECK_WARNING (CWE-476): [#def52]
lilv-0.24.26/src/node.c:222: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  220|     result->world    = val->world;
#  221|     result->node     = sord_node_copy(val->node);
#  222|->   result->val      = val->val;
#  223|     result->type     = val->type;
#  224|     return result;

Error: CPPCHECK_WARNING (CWE-476): [#def53]
lilv-0.24.26/src/node.c:223: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  221|     result->node     = sord_node_copy(val->node);
#  222|     result->val      = val->val;
#  223|->   result->type     = val->type;
#  224|     return result;
#  225|   }

Error: CPPCHECK_WARNING (CWE-476): [#def54]
lilv-0.24.26/src/node.c:276: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  274|       len    = strlen(str) + 3;
#  275|       result = (char*)calloc(len, 1);
#  276|->     snprintf(result, len, "<%s>", str);
#  277|       break;
#  278|     case LILV_VALUE_BLANK:

Error: CPPCHECK_WARNING (CWE-476): [#def55]
lilv-0.24.26/src/node.c:281: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  279|       len    = strlen(str) + 3;
#  280|       result = (char*)calloc(len, 1);
#  281|->     snprintf(result, len, "_:%s", str);
#  282|       break;
#  283|     case LILV_VALUE_STRING:

Error: CPPCHECK_WARNING (CWE-476): [#def56]
lilv-0.24.26/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): [#def57]
lilv-0.24.26/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): [#def58]
lilv-0.24.26/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): [#def59]
lilv-0.24.26/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): [#def60]
lilv-0.24.26/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): [#def61]
lilv-0.24.26/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): [#def62]
lilv-0.24.26/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|     plugin->replaced     = false;

Error: CPPCHECK_WARNING (CWE-476): [#def63]
lilv-0.24.26/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|     plugin->replaced     = false;
#   44|   }

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

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

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

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

Error: CPPCHECK_WARNING (CWE-476): [#def68]
lilv-0.24.26/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             = lilv_node_new_from_node(world, uri);
#   22|     pc->label           = lilv_node_new(world, LILV_VALUE_STRING, label);

Error: CPPCHECK_WARNING (CWE-476): [#def69]
lilv-0.24.26/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             = lilv_node_new_from_node(world, uri);
#   22|     pc->label           = lilv_node_new(world, LILV_VALUE_STRING, label);
#   23|     pc->parent_uri =

Error: CPPCHECK_WARNING (CWE-476): [#def70]
lilv-0.24.26/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             = lilv_node_new_from_node(world, 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): [#def71]
lilv-0.24.26/src/pluginclass.c:23: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pc
#   21|     pc->uri             = lilv_node_new_from_node(world, 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): [#def72]
lilv-0.24.26/src/port.c:26: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: port
#   24|   {
#   25|     LilvPort* port = (LilvPort*)malloc(sizeof(LilvPort));
#   26|->   port->node     = lilv_node_new_from_node(world, node);
#   27|     port->index    = index;
#   28|     port->symbol   = lilv_node_new(world, LILV_VALUE_STRING, symbol);

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

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

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

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

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

Error: CPPCHECK_WARNING (CWE-476): [#def78]
lilv-0.24.26/src/state.c:136: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pv->atom
#  134|       pv->symbol     = lilv_strdup(port_symbol);
#  135|       pv->atom       = (LV2_Atom*)malloc(sizeof(LV2_Atom) + size);
#  136|->     pv->atom->size = size;
#  137|       pv->atom->type = type;
#  138|       memcpy(pv->atom + 1, value, size);

Error: CPPCHECK_WARNING (CWE-476): [#def79]
lilv-0.24.26/src/state.c:344: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pm
#  342|     // Add record to path mapping
#  343|     PathMap* pm = (PathMap*)malloc(sizeof(PathMap));
#  344|->   pm->abs     = real_path;
#  345|     pm->rel     = lilv_strdup(path);
#  346|     zix_tree_insert(state->abs2rel, pm, NULL);

Error: CPPCHECK_WARNING (CWE-476): [#def80]
lilv-0.24.26/src/state.c:345: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pm
#  343|     PathMap* pm = (PathMap*)malloc(sizeof(PathMap));
#  344|     pm->abs     = real_path;
#  345|->   pm->rel     = lilv_strdup(path);
#  346|     zix_tree_insert(state->abs2rel, pm, NULL);
#  347|     zix_tree_insert(state->rel2abs, pm, NULL);

Error: CPPCHECK_WARNING (CWE-476): [#def81]
lilv-0.24.26/src/state.c:395: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  393|   
#  394|     if (features) {
#  395|->     memcpy(ret, features, n_features * sizeof(LV2_Feature*));
#  396|     }
#  397|   

Error: CPPCHECK_WARNING (CWE-476): [#def82]
lilv-0.24.26/src/state.c:400: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  398|     size_t i = n_features;
#  399|     if (map) {
#  400|->     ret[i++] = map;
#  401|     }
#  402|     if (make) {

Error: CPPCHECK_WARNING (CWE-476): [#def83]
lilv-0.24.26/src/state.c:403: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
#  401|     }
#  402|     if (make) {
#  403|->     ret[i++] = make;
#  404|     }
#  405|     if (free) {

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

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

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

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

Error: CPPCHECK_WARNING (CWE-476): [#def88]
lilv-0.24.26/src/state.c:469: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  467|     state->abs2rel     = zix_tree_new(NULL, false, abs_cmp, NULL, map_free, NULL);
#  468|     state->rel2abs     = zix_tree_new(NULL, false, rel_cmp, NULL, NULL, NULL);
#  469|->   state->scratch_dir = scratch_dir ? normal_dir(scratch_dir) : NULL;
#  470|     state->copy_dir    = copy_dir ? normal_dir(copy_dir) : NULL;
#  471|     state->link_dir    = link_dir ? normal_dir(link_dir) : NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def89]
lilv-0.24.26/src/state.c:470: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  468|     state->rel2abs     = zix_tree_new(NULL, false, rel_cmp, NULL, NULL, NULL);
#  469|     state->scratch_dir = scratch_dir ? normal_dir(scratch_dir) : NULL;
#  470|->   state->copy_dir    = copy_dir ? normal_dir(copy_dir) : NULL;
#  471|     state->link_dir    = link_dir ? normal_dir(link_dir) : NULL;
#  472|     state->dir         = save_dir ? normal_dir(save_dir) : NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def90]
lilv-0.24.26/src/state.c:471: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  469|     state->scratch_dir = scratch_dir ? normal_dir(scratch_dir) : NULL;
#  470|     state->copy_dir    = copy_dir ? normal_dir(copy_dir) : NULL;
#  471|->   state->link_dir    = link_dir ? normal_dir(link_dir) : NULL;
#  472|     state->dir         = save_dir ? normal_dir(save_dir) : NULL;
#  473|     state->atom_Path   = map->map(map->handle, LV2_ATOM__Path);

Error: CPPCHECK_WARNING (CWE-476): [#def91]
lilv-0.24.26/src/state.c:472: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  470|     state->copy_dir    = copy_dir ? normal_dir(copy_dir) : NULL;
#  471|     state->link_dir    = link_dir ? normal_dir(link_dir) : NULL;
#  472|->   state->dir         = save_dir ? normal_dir(save_dir) : NULL;
#  473|     state->atom_Path   = map->map(map->handle, LV2_ATOM__Path);
#  474|   

Error: CPPCHECK_WARNING (CWE-476): [#def92]
lilv-0.24.26/src/state.c:473: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  471|     state->link_dir    = link_dir ? normal_dir(link_dir) : NULL;
#  472|     state->dir         = save_dir ? normal_dir(save_dir) : NULL;
#  473|->   state->atom_Path   = map->map(map->handle, LV2_ATOM__Path);
#  474|   
#  475|     LV2_State_Map_Path  pmap          = {state, abstract_path, absolute_path};

Error: CPPCHECK_WARNING (CWE-476): [#def93]
lilv-0.24.26/src/state.c:616: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  614|     // Allocate state
#  615|     LilvState* const state = (LilvState*)calloc(1, sizeof(LilvState));
#  616|->   state->dir             = dir ? zix_path_join(NULL, dir, NULL) : NULL;
#  617|     state->atom_Path       = map->map(map->handle, LV2_ATOM__Path);
#  618|     state->uri             = lilv_node_new_from_node(world, node);

Error: CPPCHECK_WARNING (CWE-476): [#def94]
lilv-0.24.26/src/state.c:617: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  615|     LilvState* const state = (LilvState*)calloc(1, sizeof(LilvState));
#  616|     state->dir             = dir ? zix_path_join(NULL, dir, NULL) : NULL;
#  617|->   state->atom_Path       = map->map(map->handle, LV2_ATOM__Path);
#  618|     state->uri             = lilv_node_new_from_node(world, node);
#  619|   

Error: CPPCHECK_WARNING (CWE-476): [#def95]
lilv-0.24.26/src/state.c:618: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  616|     state->dir             = dir ? zix_path_join(NULL, dir, NULL) : NULL;
#  617|     state->atom_Path       = map->map(map->handle, LV2_ATOM__Path);
#  618|->   state->uri             = lilv_node_new_from_node(world, node);
#  619|   
#  620|     // Get the plugin URI this state applies to

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

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

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

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

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

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

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

Error: CPPCHECK_WARNING (CWE-476): [#def103]
lilv-0.24.26/src/util.c:36: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#   34|     char*  result = (char*)malloc(len + 1);
#   35|   
#   36|->   memcpy(result, first, len);
#   37|   
#   38|     va_list args; // NOLINT(cppcoreguidelines-init-variables)

Error: CPPCHECK_WARNING (CWE-476): [#def104]
lilv-0.24.26/src/util.c:74: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: copy
#   72|     const size_t len  = strlen(str);
#   73|     char*        copy = (char*)malloc(len + 1);
#   74|->   memcpy(copy, str, len + 1);
#   75|     return copy;
#   76|   }

Error: CPPCHECK_WARNING (CWE-476): [#def105]
lilv-0.24.26/src/util.c:142: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: path
#  140|     const size_t in_path_len = strlen(in_path);
#  141|     char*        path        = (char*)malloc(in_path_len + 7);
#  142|->   memcpy(path, in_path, in_path_len + 1);
#  143|   
#  144|     for (unsigned i = 2U; i < 1000000U; ++i) {

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

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

Error: CPPCHECK_WARNING (CWE-476): [#def108]
lilv-0.24.26/src/world.c:407: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: spec
#  405|   {
#  406|     LilvSpec* spec  = (LilvSpec*)malloc(sizeof(LilvSpec));
#  407|->   spec->spec      = sord_node_copy(specification_node);
#  408|     spec->bundle    = sord_node_copy(bundle_node);
#  409|     spec->data_uris = lilv_nodes_new();

Error: CPPCHECK_WARNING (CWE-476): [#def109]
lilv-0.24.26/src/world.c:408: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: spec
#  406|     LilvSpec* spec  = (LilvSpec*)malloc(sizeof(LilvSpec));
#  407|     spec->spec      = sord_node_copy(specification_node);
#  408|->   spec->bundle    = sord_node_copy(bundle_node);
#  409|     spec->data_uris = lilv_nodes_new();
#  410|   

Error: CPPCHECK_WARNING (CWE-476): [#def110]
lilv-0.24.26/src/world.c:409: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: spec
#  407|     spec->spec      = sord_node_copy(specification_node);
#  408|     spec->bundle    = sord_node_copy(bundle_node);
#  409|->   spec->data_uris = lilv_nodes_new();
#  410|   
#  411|     // Add all data files (rdfs:seeAlso)

Error: CPPCHECK_WARNING (CWE-476): [#def111]
lilv-0.24.26/src/world.c:1009: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dir
# 1007|         const size_t dir_len = sep - lv2_path;
# 1008|         char* const  dir     = (char*)malloc(dir_len + 1);
# 1009|->       memcpy(dir, lv2_path, dir_len);
# 1010|         dir[dir_len] = '\0';
# 1011|         lilv_world_load_directory(world, dir);

Error: CPPCHECK_WARNING (CWE-476): [#def112]
lilv-0.24.26/src/world.c:1010: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dir
# 1008|         char* const  dir     = (char*)malloc(dir_len + 1);
# 1009|         memcpy(dir, lv2_path, dir_len);
# 1010|->       dir[dir_len] = '\0';
# 1011|         lilv_world_load_directory(world, dir);
# 1012|         free(dir);

Error: CPPCHECK_WARNING (CWE-476): [#def113]
lilv-0.24.26/test/lilv_test_utils.c:30: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: env
#   28|     LilvTestEnv* env = (LilvTestEnv*)calloc(1, sizeof(LilvTestEnv));
#   29|   
#   30|->   env->world       = world;
#   31|     env->plugin1_uri = lilv_new_uri(world, "http://example.org/plug");
#   32|     env->plugin2_uri = lilv_new_uri(world, "http://example.org/foobar");

Error: CPPCHECK_WARNING (CWE-476): [#def114]
lilv-0.24.26/test/lilv_test_utils.c:31: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: env
#   29|   
#   30|     env->world       = world;
#   31|->   env->plugin1_uri = lilv_new_uri(world, "http://example.org/plug");
#   32|     env->plugin2_uri = lilv_new_uri(world, "http://example.org/foobar");
#   33|   

Error: CPPCHECK_WARNING (CWE-476): [#def115]
lilv-0.24.26/test/lilv_test_utils.c:32: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: env
#   30|     env->world       = world;
#   31|     env->plugin1_uri = lilv_new_uri(world, "http://example.org/plug");
#   32|->   env->plugin2_uri = lilv_new_uri(world, "http://example.org/foobar");
#   33|   
#   34|     // Set custom LV2_PATH in build directory to only use test data

Error: CPPCHECK_WARNING (CWE-476): [#def116]
lilv-0.24.26/test/test_state.c:66: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   64|     lilv_test_uri_map_init(&ctx->uri_map);
#   65|   
#   66|->   ctx->env                    = lilv_test_env_new();
#   67|     ctx->map.handle             = &ctx->uri_map;
#   68|     ctx->map.map                = map_uri;

Error: CPPCHECK_WARNING (CWE-476): [#def117]
lilv-0.24.26/test/test_state.c:67: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   65|   
#   66|     ctx->env                    = lilv_test_env_new();
#   67|->   ctx->map.handle             = &ctx->uri_map;
#   68|     ctx->map.map                = map_uri;
#   69|     ctx->map_feature.URI        = LV2_URID_MAP_URI;

Error: CPPCHECK_WARNING (CWE-476): [#def118]
lilv-0.24.26/test/test_state.c:68: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   66|     ctx->env                    = lilv_test_env_new();
#   67|     ctx->map.handle             = &ctx->uri_map;
#   68|->   ctx->map.map                = map_uri;
#   69|     ctx->map_feature.URI        = LV2_URID_MAP_URI;
#   70|     ctx->map_feature.data       = &ctx->map;

Error: CPPCHECK_WARNING (CWE-476): [#def119]
lilv-0.24.26/test/test_state.c:69: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   67|     ctx->map.handle             = &ctx->uri_map;
#   68|     ctx->map.map                = map_uri;
#   69|->   ctx->map_feature.URI        = LV2_URID_MAP_URI;
#   70|     ctx->map_feature.data       = &ctx->map;
#   71|     ctx->unmap.handle           = &ctx->uri_map;

Error: CPPCHECK_WARNING (CWE-476): [#def120]
lilv-0.24.26/test/test_state.c:70: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   68|     ctx->map.map                = map_uri;
#   69|     ctx->map_feature.URI        = LV2_URID_MAP_URI;
#   70|->   ctx->map_feature.data       = &ctx->map;
#   71|     ctx->unmap.handle           = &ctx->uri_map;
#   72|     ctx->unmap.unmap            = unmap_uri;

Error: CPPCHECK_WARNING (CWE-476): [#def121]
lilv-0.24.26/test/test_state.c:71: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   69|     ctx->map_feature.URI        = LV2_URID_MAP_URI;
#   70|     ctx->map_feature.data       = &ctx->map;
#   71|->   ctx->unmap.handle           = &ctx->uri_map;
#   72|     ctx->unmap.unmap            = unmap_uri;
#   73|     ctx->unmap_feature.URI      = LV2_URID_UNMAP_URI;

Error: CPPCHECK_WARNING (CWE-476): [#def122]
lilv-0.24.26/test/test_state.c:72: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   70|     ctx->map_feature.data       = &ctx->map;
#   71|     ctx->unmap.handle           = &ctx->uri_map;
#   72|->   ctx->unmap.unmap            = unmap_uri;
#   73|     ctx->unmap_feature.URI      = LV2_URID_UNMAP_URI;
#   74|     ctx->unmap_feature.data     = &ctx->unmap;

Error: CPPCHECK_WARNING (CWE-476): [#def123]
lilv-0.24.26/test/test_state.c:73: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   71|     ctx->unmap.handle           = &ctx->uri_map;
#   72|     ctx->unmap.unmap            = unmap_uri;
#   73|->   ctx->unmap_feature.URI      = LV2_URID_UNMAP_URI;
#   74|     ctx->unmap_feature.data     = &ctx->unmap;
#   75|     ctx->free_path.free_path    = lilv_free_path;

Error: CPPCHECK_WARNING (CWE-476): [#def124]
lilv-0.24.26/test/test_state.c:74: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   72|     ctx->unmap.unmap            = unmap_uri;
#   73|     ctx->unmap_feature.URI      = LV2_URID_UNMAP_URI;
#   74|->   ctx->unmap_feature.data     = &ctx->unmap;
#   75|     ctx->free_path.free_path    = lilv_free_path;
#   76|     ctx->free_path_feature.URI  = LV2_STATE__freePath;

Error: CPPCHECK_WARNING (CWE-476): [#def125]
lilv-0.24.26/test/test_state.c:75: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   73|     ctx->unmap_feature.URI      = LV2_URID_UNMAP_URI;
#   74|     ctx->unmap_feature.data     = &ctx->unmap;
#   75|->   ctx->free_path.free_path    = lilv_free_path;
#   76|     ctx->free_path_feature.URI  = LV2_STATE__freePath;
#   77|     ctx->free_path_feature.data = &ctx->free_path;

Error: CPPCHECK_WARNING (CWE-476): [#def126]
lilv-0.24.26/test/test_state.c:76: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   74|     ctx->unmap_feature.data     = &ctx->unmap;
#   75|     ctx->free_path.free_path    = lilv_free_path;
#   76|->   ctx->free_path_feature.URI  = LV2_STATE__freePath;
#   77|     ctx->free_path_feature.data = &ctx->free_path;
#   78|     ctx->features[0]            = &ctx->map_feature;

Error: CPPCHECK_WARNING (CWE-476): [#def127]
lilv-0.24.26/test/test_state.c:77: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   75|     ctx->free_path.free_path    = lilv_free_path;
#   76|     ctx->free_path_feature.URI  = LV2_STATE__freePath;
#   77|->   ctx->free_path_feature.data = &ctx->free_path;
#   78|     ctx->features[0]            = &ctx->map_feature;
#   79|     ctx->features[1]            = &ctx->unmap_feature;

Error: CPPCHECK_WARNING (CWE-476): [#def128]
lilv-0.24.26/test/test_state.c:78: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   76|     ctx->free_path_feature.URI  = LV2_STATE__freePath;
#   77|     ctx->free_path_feature.data = &ctx->free_path;
#   78|->   ctx->features[0]            = &ctx->map_feature;
#   79|     ctx->features[1]            = &ctx->unmap_feature;
#   80|     ctx->features[2]            = &ctx->free_path_feature;

Error: CPPCHECK_WARNING (CWE-476): [#def129]
lilv-0.24.26/test/test_state.c:79: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   77|     ctx->free_path_feature.data = &ctx->free_path;
#   78|     ctx->features[0]            = &ctx->map_feature;
#   79|->   ctx->features[1]            = &ctx->unmap_feature;
#   80|     ctx->features[2]            = &ctx->free_path_feature;
#   81|     ctx->features[3]            = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def130]
lilv-0.24.26/test/test_state.c:80: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   78|     ctx->features[0]            = &ctx->map_feature;
#   79|     ctx->features[1]            = &ctx->unmap_feature;
#   80|->   ctx->features[2]            = &ctx->free_path_feature;
#   81|     ctx->features[3]            = NULL;
#   82|   

Error: CPPCHECK_WARNING (CWE-476): [#def131]
lilv-0.24.26/test/test_state.c:81: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   79|     ctx->features[1]            = &ctx->unmap_feature;
#   80|     ctx->features[2]            = &ctx->free_path_feature;
#   81|->   ctx->features[3]            = NULL;
#   82|   
#   83|     ctx->atom_Float =

Error: CPPCHECK_WARNING (CWE-476): [#def132]
lilv-0.24.26/test/test_state.c:83: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   81|     ctx->features[3]            = NULL;
#   82|   
#   83|->   ctx->atom_Float =
#   84|       map_uri(&ctx->uri_map, "http://lv2plug.in/ns/ext/atom#Float");
#   85|   

Error: CPPCHECK_WARNING (CWE-476): [#def133]
lilv-0.24.26/test/test_state.c:86: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   84|       map_uri(&ctx->uri_map, "http://lv2plug.in/ns/ext/atom#Float");
#   85|   
#   86|->   ctx->in      = 1.0;
#   87|     ctx->out     = 42.0;
#   88|     ctx->control = 1234.0;

Error: CPPCHECK_WARNING (CWE-476): [#def134]
lilv-0.24.26/test/test_state.c:87: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   85|   
#   86|     ctx->in      = 1.0;
#   87|->   ctx->out     = 42.0;
#   88|     ctx->control = 1234.0;
#   89|   

Error: CPPCHECK_WARNING (CWE-476): [#def135]
lilv-0.24.26/test/test_state.c:88: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx
#   86|     ctx->in      = 1.0;
#   87|     ctx->out     = 42.0;
#   88|->   ctx->control = 1234.0;
#   89|   
#   90|     return ctx;

Error: CPPCHECK_WARNING (CWE-476): [#def136]
lilv-0.24.26/test/test_ui.c:146: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ui_binary_uri_str
#  144|   
#  145|     char* ui_binary_uri_str = (char*)calloc(1, ui_binary_uri_str_len + 1);
#  146|->   snprintf(ui_binary_uri_str,
#  147|              ui_binary_uri_str_len + 1,
#  148|              "%s%s",

Error: CPPCHECK_WARNING (CWE-476): [#def137]
lilv-0.24.26/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);

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-215.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelilv-0.24.26-2.fc43
store-results-to/tmp/tmpqv__pf96/lilv-0.24.26-2.fc43.tar.xz
time-created2025-04-25 14:17:27
time-finished2025-04-25 14:18:51
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpqv__pf96/lilv-0.24.26-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpqv__pf96/lilv-0.24.26-2.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9