tinysparql-3.9.2-1.fc43

List of Findings

Error: CPPCHECK_WARNING (CWE-476): [#def1]
tinysparql-3.9.2/docs/tools/tracker-docgen-md.c:572: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
#  570|   
#  571|   	g_object_unref (file);
#  572|-> 	fclose (f);
#  573|   }
#  574|   

Error: CPPCHECK_WARNING (CWE-476): [#def2]
tinysparql-3.9.2/docs/tools/tracker-docgen-md.c:727: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
#  725|   	g_free (introduction);
#  726|   	g_object_unref (file);
#  727|-> 	fclose (f);
#  728|   }

Error: CPPCHECK_WARNING (CWE-476): [#def3]
tinysparql-3.9.2/docs/tools/tracker-utils.c:131: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
#  129|   
#  130|   	g_object_unref (file);
#  131|-> 	fclose (f);
#  132|   }
#  133|   

Error: CPPCHECK_WARNING (CWE-476): [#def4]
tinysparql-3.9.2/fuzzing/driver.c:44: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#   42|   		fseek (f, 0, SEEK_SET);
#   43|   		buf = (unsigned char*) malloc (len);
#   44|-> 		n_read = fread (buf, 1, len, f);
#   45|   		assert (n_read == len);
#   46|   		LLVMFuzzerTestOneInput (buf, len);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:663:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_file_get_path(g_file_get_child(output_location,  g_strdup_printf("%s-ontology.md.in", *description.localPrefix))), "w")’
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:663:13: acquire_resource: opened here
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:663:13: danger: ‘fopen(g_file_get_path(g_file_get_child(output_location,  g_strdup_printf("%s-ontology.md.in", *description.localPrefix))), "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  661|   
#  662|   	path = g_file_get_path (file);
#  663|-> 	f = fopen (path, "w");
#  664|   	g_assert (f != NULL);
#  665|   	g_free (path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:663:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_file_get_path(g_file_get_child(output_location,  g_strdup_printf("%s-ontology.md.in", *description.localPrefix))), "w")’
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:663:13: acquire_memory: allocated here
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:663:13: danger: ‘fopen(g_file_get_path(g_file_get_child(output_location,  g_strdup_printf("%s-ontology.md.in", *description.localPrefix))), "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  661|   
#  662|   	path = g_file_get_path (file);
#  663|-> 	f = fopen (path, "w");
#  664|   	g_assert (f != NULL);
#  665|   	g_free (path);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:665:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_file_get_path(g_file_get_child(output_location,  g_strdup_printf("%s-ontology.md.in", *description.localPrefix))), "w")’
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:663:13: acquire_resource: opened here
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:664:9: branch_true: following ‘true’ branch...
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:665:9: branch_true: ...to here
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:665:9: danger: ‘fopen(g_file_get_path(g_file_get_child(output_location,  g_strdup_printf("%s-ontology.md.in", *description.localPrefix))), "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  663|   	f = fopen (path, "w");
#  664|   	g_assert (f != NULL);
#  665|-> 	g_free (path);
#  666|   
#  667|   	upper_name = g_ascii_strup (description->localPrefix, -1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:665:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_file_get_path(g_file_get_child(output_location,  g_strdup_printf("%s-ontology.md.in", *description.localPrefix))), "w")’
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:663:13: acquire_memory: allocated here
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:664:9: branch_true: following ‘true’ branch...
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:665:9: branch_true: ...to here
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:665:9: danger: ‘fopen(g_file_get_path(g_file_get_child(output_location,  g_strdup_printf("%s-ontology.md.in", *description.localPrefix))), "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  663|   	f = fopen (path, "w");
#  664|   	g_assert (f != NULL);
#  665|-> 	g_free (path);
#  666|   
#  667|   	upper_name = g_ascii_strup (description->localPrefix, -1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:667:37: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_file_get_path(g_file_get_child(output_location,  g_strdup_printf("%s-ontology.md.in", *description.localPrefix))), "w")’
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:663:13: acquire_resource: opened here
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:664:9: branch_true: following ‘true’ branch...
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:665:9: branch_true: ...to here
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:667:37: danger: ‘fopen(g_file_get_path(g_file_get_child(output_location,  g_strdup_printf("%s-ontology.md.in", *description.localPrefix))), "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  665|   	g_free (path);
#  666|   
#  667|-> 	upper_name = g_ascii_strup (description->localPrefix, -1);
#  668|   	classes = tracker_ontology_model_list_classes (model, prefix);
#  669|   	properties = tracker_ontology_model_list_properties (model, prefix);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:667:37: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_file_get_path(g_file_get_child(output_location,  g_strdup_printf("%s-ontology.md.in", *description.localPrefix))), "w")’
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:663:13: acquire_memory: allocated here
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:664:9: branch_true: following ‘true’ branch...
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:665:9: branch_true: ...to here
tinysparql-3.9.2/redhat-linux-build/../docs/tools/tracker-docgen-md.c:667:37: danger: ‘fopen(g_file_get_path(g_file_get_child(output_location,  g_strdup_printf("%s-ontology.md.in", *description.localPrefix))), "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  665|   	g_free (path);
#  666|   
#  667|-> 	upper_name = g_ascii_strup (description->localPrefix, -1);
#  668|   	classes = tracker_ontology_model_list_classes (model, prefix);
#  669|   	properties = tracker_ontology_model_list_properties (model, prefix);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def11]
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-file-utils.c:116:26: warning[-Wanalyzer-null-argument]: use of NULL ‘_path’ where non-null expected
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-file-utils.c:105:1: enter_function: entry to ‘statvfs_helper’
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-file-utils.c:116:26: danger: argument 1 (‘_path’) NULL where non-null expected
#  114|   	_path = g_strdup (path);
#  115|   
#  116|-> 	while ((retval = __statvfs (_path, st)) == -1 && errno == ENOENT) {
#  117|   		gchar *tmp = g_path_get_dirname (_path);
#  118|   		g_free (_path);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def12]
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:151:21: warning[-Wanalyzer-null-argument]: use of NULL ‘g_strndup(*<unknown>, (long unsigned int)len)’ where non-null expected
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:125:1: enter_function: entry to ‘ensure_language’
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:134:21: branch_true: following ‘true’ branch...
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:139:21: branch_true: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:139:20: branch_false: following ‘false’ branch (when the strings are non-equal)...
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:140:21: branch_false: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:139:21: branch_false: following ‘false’ branch...
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:141:21: branch_false: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:139:21: branch_false: following ‘false’ branch (when the strings are non-equal)...
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:144:23: branch_false: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:145:23: branch_false: following ‘false’ branch (when ‘sep’ is NULL)...
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:145:60: branch_false: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:148:20: branch_true: following ‘true’ branch...
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:149:47: call_function: inlined call to ‘g_strdup_inline’ from ‘ensure_language’
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-language.c:151:21: danger: argument 1 (‘g_strndup(*<unknown>, (long unsigned int)len)’) NULL where non-null expected
#  149|   			priv->language_code = g_strdup (code);
#  150|   
#  151|-> 		if (strcmp (code, "en") == 0)
#  152|   			priv->lang_has_english = TRUE;
#  153|   

Error: GCC_ANALYZER_WARNING (CWE-131): [#def13]
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-parser-libicu.c:885:27: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-parser-libicu.c:884:12: branch_true: following ‘true’ branch...
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-parser-libicu.c:885:27: branch_true: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-parser-libicu.c:885:27: danger: allocated ‘len’ bytes and assigned to ‘uint16_t *’ {{aka ‘short unsigned int *’}} here; ‘sizeof (uint16_t {{aka short unsigned int}})’ is ‘2’
#  883|   
#  884|   	if (!U_SUCCESS (status)) {
#  885|-> 		zOutput = g_memdup2 (input, len);
#  886|   		nOutput = len;
#  887|   	}

Error: GCC_ANALYZER_WARNING (CWE-131): [#def14]
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-parser-libicu.c:913:27: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-parser-libicu.c:912:12: branch_true: following ‘true’ branch...
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-parser-libicu.c:913:27: branch_true: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-parser-libicu.c:913:27: danger: allocated ‘len’ bytes and assigned to ‘uint16_t *’ {{aka ‘short unsigned int *’}} here; ‘sizeof (uint16_t {{aka short unsigned int}})’ is ‘2’
#  911|   
#  912|   	if (!U_SUCCESS (status)) {
#  913|-> 		zOutput = g_memdup2 (input, len);
#  914|   		nOutput = len;
#  915|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:182:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(fds[1], 1)’
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:152:1: enter_function: entry to ‘tracker_term_pipe_to_pager’
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:158:14: call_function: inlined call to ‘tracker_term_is_tty’ from ‘tracker_term_pipe_to_pager’
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:158:12: branch_false: following ‘false’ branch...
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:162:13: branch_false: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:162:12: branch_false: following ‘false’ branch...
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:165:25: branch_false: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:165:25: call_function: calling ‘best_pager’ from ‘tracker_term_pipe_to_pager’
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:165:25: return_function: returning to ‘tracker_term_pipe_to_pager’ from ‘best_pager’
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:166:12: branch_false: following ‘false’ branch...
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:170:9: branch_false: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:170:9: call_function: calling ‘tracker_term_dimensions’ from ‘tracker_term_pipe_to_pager’
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:170:9: return_function: returning to ‘tracker_term_pipe_to_pager’ from ‘tracker_term_dimensions’
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:182:13: acquire_resource: opened here
tinysparql-3.9.2/redhat-linux-build/../src/common/tracker-term-utils.c:182:12: danger: ‘dup2(fds[1], 1)’ leaks here; was opened at [(22)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/21)
#  180|   	close (fds[0]);
#  181|   
#  182|-> 	if (dup2(fds[1], STDOUT_FILENO) < 0)
#  183|   	        return FALSE;
#  184|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def16]
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-deserializer-json-ld.c:570:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-deserializer-json-ld.c:701:1: enter_function: entry to ‘tracker_deserializer_json_ld_next’
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-deserializer-json-ld.c:708:12: branch_false: following ‘false’ branch...
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-deserializer-json-ld.c:716:9: branch_false: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-deserializer-json-ld.c:718:16: branch_true: following ‘true’ branch...
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-deserializer-json-ld.c:719:25: branch_true: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-deserializer-json-ld.c:721:20: branch_false: following ‘false’ branch...
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-deserializer-json-ld.c:724:22: branch_false: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-deserializer-json-ld.c:724:22: call_function: calling ‘forward_state’ from ‘tracker_deserializer_json_ld_next’
#  568|   		if (g_strcmp0 (member, "@type") == 0)
#  569|   			deserializer->cur_predicate = g_strdup (TRACKER_PREFIX_RDF "type");
#  570|-> 		else if (member[0] != '@')
#  571|   			deserializer->cur_predicate = tracker_namespace_manager_expand_uri (namespaces, member);
#  572|   		else

Error: GCC_ANALYZER_WARNING (CWE-688): [#def17]
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-resource.c:1108:17: warning[-Wanalyzer-null-argument]: use of NULL ‘uri_or_curie_or_blank’ where non-null expected
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-resource.c:1291:1: enter_function: entry to ‘generate_sparql_relation_deletes_foreach’
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-resource.c:1303:20: branch_false: following ‘false’ branch (when ‘value_ptr’ is non-NULL)...
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-resource.c:1303:20: branch_false: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-resource.c:1306:29: branch_true: following ‘true’ branch...
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-resource.c:1307:41: branch_true: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-resource.c:1309:29: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-resource.c:1309:29: branch_false: ...to here
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-resource.c:1312:33: call_function: calling ‘generate_sparql_deletes’ from ‘generate_sparql_relation_deletes_foreach’
# 1106|   is_blank_node (const char *uri_or_curie_or_blank)
# 1107|   {
# 1108|-> 	return (strncmp(uri_or_curie_or_blank, "_:", 2) == 0);
# 1109|   }
# 1110|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def18]
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-serializer-trig.c:108:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘((gchar **)quad)[4]’
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-serializer-trig.c:317:1: enter_function: entry to ‘tracker_serializer_trig_read’
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-serializer-trig.c:331:14: call_function: calling ‘serialize_up_to_size’ from ‘tracker_serializer_trig_read’
#  106|   	g_clear_pointer (&quad->object, g_free);
#  107|   	g_clear_pointer (&quad->graph, g_free);
#  108|-> 	g_clear_pointer (&quad->object_langtag, g_free);
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def19]
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-serializer-turtle.c:100:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘((gchar **)triple)[3]’
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-serializer-turtle.c:288:1: enter_function: entry to ‘tracker_serializer_turtle_read’
tinysparql-3.9.2/redhat-linux-build/../src/libtinysparql/tracker-serializer-turtle.c:302:14: call_function: calling ‘serialize_up_to_size’ from ‘tracker_serializer_turtle_read’
#   98|   	g_clear_pointer (&triple->predicate, g_free);
#   99|   	g_clear_pointer (&triple->object, g_free);
#  100|-> 	g_clear_pointer (&triple->object_langtag, g_free);
#  101|   }
#  102|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def20]
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-ontology-error-test.c:123:13: warning[-Wanalyzer-null-argument]: use of NULL ‘output1’ where non-null expected
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-ontology-error-test.c:181:1: enter_function: entry to ‘test_ontology_error’
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-ontology-error-test.c:206:21: branch_true: following ‘true’ branch...
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-ontology-error-test.c:208:51: branch_true: ...to here
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-ontology-error-test.c:233:20: branch_true: following ‘true’ branch...
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-ontology-error-test.c:234:47: branch_true: ...to here
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-ontology-error-test.c:234:47: call_function: calling ‘load_error_msgs’ from ‘test_ontology_error’
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-ontology-error-test.c:234:47: return_function: returning to ‘test_ontology_error’ from ‘load_error_msgs’
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-ontology-error-test.c:237:17: call_function: calling ‘ontology_error_helper’ from ‘test_ontology_error’
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-ontology-error-test.c:237:17: return_function: returning to ‘test_ontology_error’ from ‘ontology_error_helper’
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-ontology-error-test.c:240:17: call_function: calling ‘assert_same_output’ from ‘test_ontology_error’
#  121|   	gchar *diff;
#  122|   
#  123|-> 	if (strcmp (output1, output2) == 0)
#  124|   		return;
#  125|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def21]
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-service-test.c:141:13: warning[-Wanalyzer-null-argument]: use of NULL ‘results’ where non-null expected
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-service-test.c:77:16: release_memory: ‘results’ is NULL
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-service-test.c:81:12: branch_false: following ‘false’ branch...
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-service-test.c:90:24: branch_false: ...to here
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-service-test.c:132:12: branch_false: following ‘false’ branch...
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-service-test.c:139:9: branch_false: ...to here
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-service-test.c:141:13: release_memory: ‘results’ is NULL
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-service-test.c:141:13: release_memory: ‘results’ is NULL
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-service-test.c:141:13: danger: argument 1 (‘results’) NULL where non-null expected
#  139|   	g_assert_no_error (error);
#  140|   
#  141|-> 	if (strcmp (results, test_results->str) != 0) {
#  142|   		/* print result difference */
#  143|   		gchar *quoted_results;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def22]
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-sparql-test.c:618:13: warning[-Wanalyzer-null-argument]: use of NULL ‘results’ where non-null expected
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-sparql-test.c:648:1: enter_function: entry to ‘test_sparql_query’
tinysparql-3.9.2/redhat-linux-build/../tests/core/tracker-sparql-test.c:724:9: call_function: calling ‘check_result’ from ‘test_sparql_query’
#  616|   	g_assert_no_error (error);
#  617|   
#  618|-> 	if (strcmp (results, test_results->str) != 0) {
#  619|   		/* print result difference */
#  620|   		gchar *quoted_results;

Error: CPPCHECK_WARNING (CWE-457): [#def23]
tinysparql-3.9.2/src/cli/tracker-sql.c:73: warning[uninitvar]: Uninitialized variable: retval
#   71|   		retval = g_file_get_contents (path_in_utf8, &query, &size, &error);
#   72|   
#   73|-> 	if (!path_in_utf8 || !retval) {
#   74|   		g_printerr ("%s:'%s', %s\n",
#   75|   		            _("Could not read file"),

Error: COMPILER_WARNING (CWE-457): [#def24]
tinysparql-3.9.2/src/libtinysparql/core/tracker-sparql.c:405:36: warning[-Wmaybe-uninitialized]: ‘old’ may be used uninitialized
#  405 |         sparql->current_state->sql = string;
#      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
tinysparql-3.9.2/src/libtinysparql/core/tracker-sparql.c: scope_hint: In function ‘translate_Expression’
tinysparql-3.9.2/src/libtinysparql/core/tracker-sparql.c:7539:37: note: ‘old’ was declared here
# 7539 |         TrackerStringBuilder *str, *old;
#      |                                     ^~~
#  403|   
#  404|   	old = sparql->current_state->sql;
#  405|-> 	sparql->current_state->sql = string;
#  406|   
#  407|   	return old;

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-182.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-nametinysparql-3.9.2-1.fc43
store-results-to/tmp/tmp5emrcic9/tinysparql-3.9.2-1.fc43.tar.xz
time-created2025-04-25 15:50:34
time-finished2025-04-25 15:52:49
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp5emrcic9/tinysparql-3.9.2-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp5emrcic9/tinysparql-3.9.2-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9