localsearch-3.10.2-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1]
localsearch-3.10.2/redhat-linux-build/src/cli/tracker-control-proxy.h:43:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘control_proxy’
localsearch-3.10.2/src/cli/tracker-reset.c:57:1: enter_function: entry to ‘delete_info_recursively’
localsearch-3.10.2/src/cli/tracker-reset.c:69:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/cli/tracker-reset.c:72:15: branch_false: ...to here
localsearch-3.10.2/src/cli/tracker-reset.c:75:20: throw: if ‘tracker_sparql_connection_load_statement_from_gresource’ throws an exception...
localsearch-3.10.2/src/cli/tracker-reset.c:64:28: call_function: inlined call to ‘glib_autoptr_cleanup_GError’ from ‘delete_info_recursively’
localsearch-3.10.2/src/cli/tracker-reset.c:63:26: call_function: calling ‘g_autoptr_cleanup_generic_gfree’ from ‘delete_info_recursively’
localsearch-3.10.2/src/cli/tracker-reset.c:62:41: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerControlIndex’ from ‘delete_info_recursively’
#   41|   
#   42|   #if GLIB_CHECK_VERSION(2, 44, 0)
#   43|-> G_DEFINE_AUTOPTR_CLEANUP_FUNC (TrackerControlIndex, g_object_unref)
#   44|   #endif
#   45|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def2]
localsearch-3.10.2/redhat-linux-build/src/cli/tracker-indexer-proxy.h:93:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘indexer_proxy’
localsearch-3.10.2/src/cli/tracker-inhibit.c:81:1: enter_function: entry to ‘tracker_inhibit’
localsearch-3.10.2/src/cli/tracker-inhibit.c:87:26: call_function: calling ‘g_autoptr_cleanup_generic_gfree’ from ‘tracker_inhibit’
localsearch-3.10.2/src/cli/tracker-inhibit.c:86:28: call_function: inlined call to ‘glib_autoptr_cleanup_GError’ from ‘tracker_inhibit’
localsearch-3.10.2/src/cli/tracker-inhibit.c:85:41: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerIndexerMiner’ from ‘tracker_inhibit’
#   91|   
#   92|   #if GLIB_CHECK_VERSION(2, 44, 0)
#   93|-> G_DEFINE_AUTOPTR_CLEANUP_FUNC (TrackerIndexerMiner, g_object_unref)
#   94|   #endif
#   95|   

Error: COMPILER_WARNING (CWE-252): [#def3]
localsearch-3.10.2/src/cli/tracker-reset.c: scope_hint: In function ‘tracker_reset’
localsearch-3.10.2/src/cli/tracker-reset.c:224:17: warning[-Wunused-result]: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’
#  224 |                 fgets (response, 100, stdin);
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  222|   
#  223|   		g_print ("%s ", _("The LocalSearch indexed data is about to be deleted, proceed? [y/N]"));
#  224|-> 		fgets (response, 100, stdin);
#  225|   		response[strlen (response) - 1] = '\0';
#  226|   

Error: COMPILER_WARNING: [#def4]
localsearch-3.10.2/src/cli/tracker-search.c: scope_hint: In function ‘get_cursor_results’
localsearch-3.10.2/src/cli/tracker-search.c:252:14: warning[-Wunused-but-set-variable=]: variable ‘count’ set but not used
#  252 |         gint count = 0;
#      |              ^~~~~
#  250|   {
#  251|   	gboolean is_tty;
#  252|-> 	gint count = 0;
#  253|   
#  254|   	is_tty = tracker_term_is_tty ();

Error: COMPILER_WARNING (CWE-457): [#def5]
localsearch-3.10.2/src/cli/tracker-status.c:437:17: warning[-Wmaybe-uninitialized]: ‘paused’ may be used uninitialized
#  437 |                 g_print (BOLD_BEGIN "%s" BOLD_END "\n",
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  438 |                          paused ?
#      |                          ~~~~~~~~
#  439 |                          _("Indexer is paused") :
#      |                          ~~~~~~~~~~~~~~~~~~~~~~~~
#  440 |                          _("Data is still being indexed"));
#      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
localsearch-3.10.2/src/cli/tracker-status.c: scope_hint: In function ‘tracker_status’
localsearch-3.10.2/src/cli/tracker-status.c:397:29: note: ‘paused’ was declared here
#  397 |         gboolean use_pager, paused;
#      |                             ^~~~~~
#  435|   	/* Are we finished indexing? */
#  436|   	if (!are_miners_finished (&paused)) {
#  437|-> 		g_print (BOLD_BEGIN "%s" BOLD_END "\n",
#  438|   		         paused ?
#  439|   		         _("Indexer is paused") :

Error: GCC_ANALYZER_WARNING (CWE-404): [#def6]
localsearch-3.10.2/src/common/tracker-dbus.c:353:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
localsearch-3.10.2/src/common/tracker-dbus.c:352:9: acquire_resource: ‘va_start’ called here
localsearch-3.10.2/src/common/tracker-dbus.c:353:15: throw: if ‘g_strdup_vprintf’ throws an exception...
localsearch-3.10.2/src/common/tracker-dbus.c:353:15: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  351|   
#  352|   	va_start (args, format);
#  353|-> 	str = g_strdup_vprintf (format, args);
#  354|   	va_end (args);
#  355|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def7]
localsearch-3.10.2/src/common/tracker-dbus.c:411:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
localsearch-3.10.2/src/common/tracker-dbus.c:410:9: acquire_resource: ‘va_start’ called here
localsearch-3.10.2/src/common/tracker-dbus.c:411:15: throw: if ‘g_strdup_vprintf’ throws an exception...
localsearch-3.10.2/src/common/tracker-dbus.c:411:15: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  409|   
#  410|   	va_start (args, format);
#  411|-> 	str = g_strdup_vprintf (format, args);
#  412|   	va_end (args);
#  413|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def8]
localsearch-3.10.2/src/common/tracker-dbus.c:432:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
localsearch-3.10.2/src/common/tracker-dbus.c:431:9: acquire_resource: ‘va_start’ called here
localsearch-3.10.2/src/common/tracker-dbus.c:432:15: throw: if ‘g_strdup_vprintf’ throws an exception...
localsearch-3.10.2/src/common/tracker-dbus.c:432:15: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  430|   
#  431|   	va_start (args, format);
#  432|-> 	str = g_strdup_vprintf (format, args);
#  433|   	va_end (args);
#  434|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def9]
localsearch-3.10.2/src/common/tracker-dbus.c:453:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
localsearch-3.10.2/src/common/tracker-dbus.c:452:9: acquire_resource: ‘va_start’ called here
localsearch-3.10.2/src/common/tracker-dbus.c:453:15: throw: if ‘g_strdup_vprintf’ throws an exception...
localsearch-3.10.2/src/common/tracker-dbus.c:453:15: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  451|   
#  452|   	va_start (args, format);
#  453|-> 	str = g_strdup_vprintf (format, args);
#  454|   	va_end (args);
#  455|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def10]
localsearch-3.10.2/src/common/tracker-dbus.c:489:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
localsearch-3.10.2/src/common/tracker-dbus.c:488:9: acquire_resource: ‘va_start’ called here
localsearch-3.10.2/src/common/tracker-dbus.c:489:15: throw: if ‘g_strdup_vprintf’ throws an exception...
localsearch-3.10.2/src/common/tracker-dbus.c:489:15: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  487|   
#  488|   	va_start (args, format);
#  489|-> 	str = g_strdup_vprintf (format, args);
#  490|   	va_end (args);
#  491|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def11]
localsearch-3.10.2/src/common/tracker-extract-info.h:53:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘info’
localsearch-3.10.2/src/extractor/tracker-extract.c:202:16: throw: if ‘g_file_new_for_uri’ throws an exception...
localsearch-3.10.2/src/extractor/tracker-extract.c:196:40: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerExtractInfo’ from ‘get_file_metadata’
#   51|                                                                      TrackerResource    *resource);
#   52|   
#   53|-> G_DEFINE_AUTOPTR_CLEANUP_FUNC (TrackerExtractInfo, tracker_extract_info_unref)
#   54|   
#   55|   G_END_DECLS

Error: GCC_ANALYZER_WARNING (CWE-688): [#def12]
localsearch-3.10.2/src/common/tracker-file-utils.c:276:26: warning[-Wanalyzer-null-argument]: use of NULL ‘_path’ where non-null expected
localsearch-3.10.2/src/common/tracker-file-utils.c:265:1: enter_function: entry to ‘statvfs_helper’
localsearch-3.10.2/src/common/tracker-file-utils.c:276:26: danger: argument 1 (‘_path’) NULL where non-null expected
#  274|   	_path = g_strdup (path);
#  275|   
#  276|-> 	while ((retval = __statvfs (_path, st)) == -1 && errno == ENOENT) {
#  277|   		gchar *tmp = g_path_get_dirname (_path);
#  278|   		g_free (_path);

Error: COMPILER_WARNING (CWE-704): [#def13]
localsearch-3.10.2/src/common/tracker-file-utils.c: scope_hint: In function ‘tracker_path_list_filter_duplicates’
localsearch-3.10.2/src/common/tracker-file-utils.c:442:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  442 |                         p = strrchr (path, G_DIR_SEPARATOR);
#      |                           ^
#  440|   
#  441|   		if (G_LIKELY (!reset)) {
#  442|-> 			p = strrchr (path, G_DIR_SEPARATOR);
#  443|   
#  444|   			/* Make sure the path doesn't have the '/' suffix. */

Error: COMPILER_WARNING (CWE-704): [#def14]
localsearch-3.10.2/src/common/tracker-file-utils.c:442:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  440|   
#  441|   		if (G_LIKELY (!reset)) {
#  442|-> 			p = strrchr (path, G_DIR_SEPARATOR);
#  443|   
#  444|   			/* Make sure the path doesn't have the '/' suffix. */

Error: COMPILER_WARNING (CWE-704): [#def15]
localsearch-3.10.2/src/common/tracker-file-utils.c: scope_hint: In function ‘tracker_filename_casecmp_without_extension’
localsearch-3.10.2/src/common/tracker-file-utils.c:675:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  675 |         pa = strrchr (a, '.');
#      |            ^
#  673|   	g_return_val_if_fail (b != NULL, FALSE);
#  674|   
#  675|-> 	pa = strrchr (a, '.');
#  676|   	pb = strrchr (b, '.');
#  677|   

Error: COMPILER_WARNING (CWE-704): [#def16]
localsearch-3.10.2/src/common/tracker-file-utils.c:675:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  673|   	g_return_val_if_fail (b != NULL, FALSE);
#  674|   
#  675|-> 	pa = strrchr (a, '.');
#  676|   	pb = strrchr (b, '.');
#  677|   

Error: COMPILER_WARNING (CWE-704): [#def17]
localsearch-3.10.2/src/common/tracker-file-utils.c:676:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  676 |         pb = strrchr (b, '.');
#      |            ^
#  674|   
#  675|   	pa = strrchr (a, '.');
#  676|-> 	pb = strrchr (b, '.');
#  677|   
#  678|   	/* Did we find a "." */

Error: COMPILER_WARNING (CWE-704): [#def18]
localsearch-3.10.2/src/common/tracker-file-utils.c:676:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  674|   
#  675|   	pa = strrchr (a, '.');
#  676|-> 	pb = strrchr (b, '.');
#  677|   
#  678|   	/* Did we find a "." */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def19]
localsearch-3.10.2/src/common/tracker-term-utils.c:180:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(fds[1], 1)’
localsearch-3.10.2/src/common/tracker-term-utils.c:151:1: enter_function: entry to ‘tracker_term_pipe_to_pager’
localsearch-3.10.2/src/common/tracker-term-utils.c:157:14: call_function: calling ‘tracker_term_is_tty’ from ‘tracker_term_pipe_to_pager’
localsearch-3.10.2/src/common/tracker-term-utils.c:157:14: return_function: returning to ‘tracker_term_pipe_to_pager’ from ‘tracker_term_is_tty’
localsearch-3.10.2/src/common/tracker-term-utils.c:157:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/common/tracker-term-utils.c:160:13: branch_false: ...to here
localsearch-3.10.2/src/common/tracker-term-utils.c:160:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/common/tracker-term-utils.c:163:25: branch_false: ...to here
localsearch-3.10.2/src/common/tracker-term-utils.c:163:25: call_function: calling ‘best_pager’ from ‘tracker_term_pipe_to_pager’
localsearch-3.10.2/src/common/tracker-term-utils.c:163:25: return_function: returning to ‘tracker_term_pipe_to_pager’ from ‘best_pager’
localsearch-3.10.2/src/common/tracker-term-utils.c:164:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/common/tracker-term-utils.c:168:9: branch_false: ...to here
localsearch-3.10.2/src/common/tracker-term-utils.c:168:9: call_function: calling ‘tracker_term_dimensions’ from ‘tracker_term_pipe_to_pager’
localsearch-3.10.2/src/common/tracker-term-utils.c:168:9: return_function: returning to ‘tracker_term_pipe_to_pager’ from ‘tracker_term_dimensions’
localsearch-3.10.2/src/common/tracker-term-utils.c:180:13: acquire_resource: opened here
localsearch-3.10.2/src/common/tracker-term-utils.c:180:12: danger: ‘dup2(fds[1], 1)’ leaks here; was opened at [(24)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/23)
#  178|   	close (fds[0]);
#  179|   
#  180|-> 	if (dup2(fds[1], STDOUT_FILENO) < 0)
#  181|   		return FALSE;
#  182|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
localsearch-3.10.2/src/control/tracker-miner-files-peer-listener.c:381:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
localsearch-3.10.2/src/control/tracker-miner-files-peer-listener.c:351:1: enter_function: entry to ‘tracker_miner_files_peer_listener_add_watch’
localsearch-3.10.2/src/control/tracker-miner-files-peer-listener.c:361:9: branch_false: following ‘false’ branch (when ‘listener’ is non-NULL)...
localsearch-3.10.2/src/control/tracker-miner-files-peer-listener.c:361:9: branch_false: ...to here
localsearch-3.10.2/src/control/tracker-miner-files-peer-listener.c:362:9: branch_false: following ‘false’ branch (when ‘file’ is non-NULL)...
localsearch-3.10.2/src/control/tracker-miner-files-peer-listener.c:362:9: branch_false: ...to here
localsearch-3.10.2/src/control/tracker-miner-files-peer-listener.c:363:9: branch_true: following ‘true’ branch (when ‘dbus_name’ is non-NULL)...
localsearch-3.10.2/src/control/tracker-miner-files-peer-listener.c:365:16: call_function: inlined call to ‘tracker_miner_files_peer_listener_get_instance_private’ from ‘tracker_miner_files_peer_listener_add_watch’
localsearch-3.10.2/src/control/tracker-miner-files-peer-listener.c:376:12: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/control/tracker-miner-files-peer-listener.c:379:29: branch_true: ...to here
localsearch-3.10.2/src/control/tracker-miner-files-peer-listener.c:379:29: call_function: calling ‘file_peers_data_new’ from ‘tracker_miner_files_peer_listener_add_watch’
localsearch-3.10.2/src/control/tracker-miner-files-peer-listener.c:379:29: return_function: returning to ‘tracker_miner_files_peer_listener_add_watch’ from ‘file_peers_data_new’
localsearch-3.10.2/src/control/tracker-miner-files-peer-listener.c:381:38: danger: dereference of NULL ‘file_peers_data_new(file)’
#  379|   		file_data = file_peers_data_new (file);
#  380|   		g_hash_table_insert (priv->file_peers,
#  381|-> 		                     file_data->file, file_data);
#  382|   		g_signal_emit (listener, signals[WATCH_FILE], 0, file_data->file);
#  383|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def21]
localsearch-3.10.2/src/extractor/tracker-decorator.h:32:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘decorator’
localsearch-3.10.2/src/extractor/tracker-main.c:309:1: enter_function: entry to ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:332:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:337:13: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:337:13: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:348:13: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:348:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:353:9: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:357:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:360:9: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:363:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:367:13: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:367:12: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:371:26: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:373:20: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:374:34: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:368:37: call_function: inlined call to ‘glib_autoptr_cleanup_GSocket’ from ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:385:12: branch_false: following ‘false’ branch (when ‘connection’ is non-NULL)...
localsearch-3.10.2/src/extractor/tracker-main.c:391:19: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:398:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:404:23: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:317:37: call_function: inlined call to ‘glib_autoptr_cleanup_GDBusConnection’ from ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:316:31: call_function: inlined call to ‘glib_autoptr_cleanup_GMainLoop’ from ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:315:46: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerExtractController’ from ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:314:38: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerDecorator’ from ‘do_main’
#   30|   
#   31|   #define TRACKER_TYPE_DECORATOR (tracker_decorator_get_type())
#   32|-> G_DECLARE_FINAL_TYPE (TrackerDecorator,
#   33|                         tracker_decorator,
#   34|                         TRACKER, DECORATOR,

Error: GCC_ANALYZER_WARNING (CWE-457): [#def22]
localsearch-3.10.2/src/extractor/tracker-extract-controller.h:30:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘controller’
localsearch-3.10.2/src/extractor/tracker-main.c:309:1: enter_function: entry to ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:332:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:337:13: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:337:13: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:348:13: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:348:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:353:9: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:357:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:360:9: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:363:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:367:13: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:367:12: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:371:26: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:373:20: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:374:34: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:368:37: call_function: inlined call to ‘glib_autoptr_cleanup_GSocket’ from ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:385:12: branch_false: following ‘false’ branch (when ‘connection’ is non-NULL)...
localsearch-3.10.2/src/extractor/tracker-main.c:391:19: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:398:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:404:23: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:415:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:421:28: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:317:37: call_function: inlined call to ‘glib_autoptr_cleanup_GDBusConnection’ from ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:316:31: call_function: inlined call to ‘glib_autoptr_cleanup_GMainLoop’ from ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:315:46: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerExtractController’ from ‘do_main’
#   28|   
#   29|   #define TRACKER_TYPE_EXTRACT_CONTROLLER (tracker_extract_controller_get_type ())
#   30|-> G_DECLARE_FINAL_TYPE (TrackerExtractController,
#   31|                         tracker_extract_controller,
#   32|                         TRACKER, EXTRACT_CONTROLLER,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
localsearch-3.10.2/src/extractor/tracker-extract-gif.c:55:9: warning[-Wanalyzer-malloc-leak]: leak of ‘extBlock.bytes’
localsearch-3.10.2/src/extractor/tracker-extract-gif.c:467:1: enter_function: entry to ‘tracker_extract_get_metadata’
localsearch-3.10.2/src/extractor/tracker-extract-gif.c:484:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-extract-gif.c:489:14: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-gif.c:491:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-extract-gif.c:505:24: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-gif.c:505:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-extract-gif.c:513:9: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-gif.c:517:20: call_function: calling ‘read_metadata’ from ‘tracker_extract_get_metadata’
#   53|   		 unsigned char extData[])
#   54|   {
#   55|-> 	extBlock->bytes = realloc(extBlock->bytes,extBlock->byteCount+len);
#   56|   	if (extBlock->bytes == NULL) {
#   57|   		return (GIF_ERROR);

Error: COMPILER_WARNING (CWE-477): [#def24]
localsearch-3.10.2/src/extractor/tracker-extract-html.c: scope_hint: In function ‘tracker_extract_get_metadata’
localsearch-3.10.2/src/extractor/tracker-extract-html.c:288:9: warning[-Wdeprecated-declarations]: ‘htmlSAXParseFile’ is deprecated
#  288 |         doc = htmlSAXParseFile (filename, NULL, &handler, &pd);
#      |         ^~~
localsearch-3.10.2/src/extractor/tracker-extract-html.c:27: included_from: Included from here.
/usr/include/libxml2/libxml/HTMLparser.h:157:25: note: declared here
#  157 |                         htmlSAXParseFile(const char *filename,
#      |                         ^~~~~~~~~~~~~~~~
#  286|   
#  287|   	filename = g_file_get_path (file);
#  288|-> 	doc = htmlSAXParseFile (filename, NULL, &handler, &pd);
#  289|   	g_free (filename);
#  290|   

Error: COMPILER_WARNING (CWE-477): [#def25]
localsearch-3.10.2/src/extractor/tracker-extract-html.c:288:9: warning[-Wdeprecated-declarations]: ‘htmlSAXParseFile’ is deprecated
#  286|   
#  287|   	filename = g_file_get_path (file);
#  288|-> 	doc = htmlSAXParseFile (filename, NULL, &handler, &pd);
#  289|   	g_free (filename);
#  290|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def26]
localsearch-3.10.2/src/extractor/tracker-extract-persistence.h:28:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘persistence’
localsearch-3.10.2/src/extractor/tracker-main.c:327:19: throw: if ‘g_option_context_new’ throws an exception...
localsearch-3.10.2/src/extractor/tracker-main.c:318:47: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerExtractPersistence’ from ‘do_main’
#   26|   
#   27|   #define TRACKER_TYPE_EXTRACT_PERSISTENCE (tracker_extract_persistence_get_type ())
#   28|-> G_DECLARE_FINAL_TYPE (TrackerExtractPersistence,
#   29|                         tracker_extract_persistence,
#   30|                         TRACKER, EXTRACT_PERSISTENCE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
localsearch-3.10.2/src/extractor/tracker-extract-png.c:105:13: warning[-Wanalyzer-malloc-leak]: leak of ‘raw_profile_new(*<unknown>.text,  input_len, & exif_buffer_length)’
localsearch-3.10.2/src/extractor/tracker-extract-png.c:185:1: enter_function: entry to ‘read_metadata’
localsearch-3.10.2/src/extractor/tracker-extract-png.c:207:30: branch_true: following ‘true’ branch (when ‘info_index != 2’)...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:208:53: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:213:29: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:214:38: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:219:28: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:232:28: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:232:28: branch_true: following ‘true’ branch (when ‘xd’ is NULL)...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:232:79: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:260:28: branch_true: following ‘true’ branch (when ‘ed’ is NULL)...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:260:80: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:271:47: call_function: calling ‘raw_profile_new’ from ‘read_metadata’
localsearch-3.10.2/src/extractor/tracker-extract-png.c:271:47: return_function: returning to ‘read_metadata’ from ‘raw_profile_new’
localsearch-3.10.2/src/extractor/tracker-extract-png.c:275:36: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:276:46: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:276:46: throw: if ‘tracker_exif_new’ throws an exception...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:105:13: danger: ‘raw_profile_new(*<unknown>.text,  input_len, & exif_buffer_length)’ leaks here; was allocated at [(14)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/13)
#  103|   	ptr = input;
#  104|   
#  105|-> 	if (*ptr != '\n') {
#  106|   		return NULL;
#  107|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
localsearch-3.10.2/src/extractor/tracker-extract-png.c:105:13: warning[-Wanalyzer-malloc-leak]: leak of ‘raw_profile_new(*<unknown>.text,  input_len, & xmp_buffer_length)’
localsearch-3.10.2/src/extractor/tracker-extract-png.c:185:1: enter_function: entry to ‘read_metadata’
localsearch-3.10.2/src/extractor/tracker-extract-png.c:207:30: branch_true: following ‘true’ branch (when ‘info_index != 2’)...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:208:53: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:213:29: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:214:38: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:219:28: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:232:28: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:232:28: branch_true: following ‘true’ branch (when ‘xd’ is NULL)...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:232:79: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:243:46: call_function: calling ‘raw_profile_new’ from ‘read_metadata’
localsearch-3.10.2/src/extractor/tracker-extract-png.c:243:46: return_function: returning to ‘read_metadata’ from ‘raw_profile_new’
localsearch-3.10.2/src/extractor/tracker-extract-png.c:247:36: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:248:46: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:248:46: throw: if ‘tracker_xmp_new’ throws an exception...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:105:13: danger: ‘raw_profile_new(*<unknown>.text,  input_len, & xmp_buffer_length)’ leaks here; was allocated at [(12)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/11)
#  103|   	ptr = input;
#  104|   
#  105|-> 	if (*ptr != '\n') {
#  106|   		return NULL;
#  107|   	}

Error: COMPILER_WARNING (CWE-704): [#def29]
localsearch-3.10.2/src/extractor/tracker-extract-png.c: scope_hint: In function ‘raw_profile_new’
localsearch-3.10.2/src/extractor/tracker-extract-png.c:162:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  162 |                         p = strchr (lut, a);
#      |                           ^
#  160|   		do {
#  161|   			gchar a = ptr[i];
#  162|-> 			p = strchr (lut, a);
#  163|   			i++;
#  164|   		} while (p == 0);

Error: COMPILER_WARNING (CWE-704): [#def30]
localsearch-3.10.2/src/extractor/tracker-extract-png.c:162:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  160|   		do {
#  161|   			gchar a = ptr[i];
#  162|-> 			p = strchr (lut, a);
#  163|   			i++;
#  164|   		} while (p == 0);

Error: COMPILER_WARNING (CWE-704): [#def31]
localsearch-3.10.2/src/extractor/tracker-extract-png.c:168:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  168 |                         q = strchr (lut, b);
#      |                           ^
#  166|   		do {
#  167|   			gchar b = ptr[i];
#  168|-> 			q = strchr (lut, b);
#  169|   			i++;
#  170|   		} while (q == 0);

Error: COMPILER_WARNING (CWE-704): [#def32]
localsearch-3.10.2/src/extractor/tracker-extract-png.c:168:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  166|   		do {
#  167|   			gchar b = ptr[i];
#  168|-> 			q = strchr (lut, b);
#  169|   			i++;
#  170|   		} while (q == 0);

Error: CPPCHECK_WARNING (CWE-476): [#def33]
localsearch-3.10.2/src/extractor/tracker-extract-png.c:172: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: output
#  170|   		} while (q == 0);
#  171|   
#  172|-> 		output[o] = (((p - lut) << 4) | (q - lut));
#  173|   		o++;
#  174|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
localsearch-3.10.2/src/extractor/tracker-extract-png.c:172:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘output’
localsearch-3.10.2/src/extractor/tracker-extract-png.c:185:1: enter_function: entry to ‘read_metadata’
localsearch-3.10.2/src/extractor/tracker-extract-png.c:207:30: branch_true: following ‘true’ branch (when ‘info_index != 2’)...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:208:53: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:213:29: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:214:38: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:219:28: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:232:28: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:232:28: branch_true: following ‘true’ branch (when ‘xd’ is NULL)...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:232:79: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:243:46: call_function: calling ‘raw_profile_new’ from ‘read_metadata’
#  170|   		} while (q == 0);
#  171|   
#  172|-> 		output[o] = (((p - lut) << 4) | (q - lut));
#  173|   		o++;
#  174|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def35]
localsearch-3.10.2/src/extractor/tracker-extract-png.c:176: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: output
#  174|   	}
#  175|   
#  176|-> 	output[o] = '\0';
#  177|   	*output_length = o;
#  178|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def36]
localsearch-3.10.2/src/extractor/tracker-extract-png.c:176:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘output’
localsearch-3.10.2/src/extractor/tracker-extract-png.c:185:1: enter_function: entry to ‘read_metadata’
localsearch-3.10.2/src/extractor/tracker-extract-png.c:207:30: branch_true: following ‘true’ branch (when ‘info_index != 2’)...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:208:53: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:213:29: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:214:38: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:219:28: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:232:28: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:232:28: branch_true: following ‘true’ branch (when ‘xd’ is NULL)...
localsearch-3.10.2/src/extractor/tracker-extract-png.c:232:79: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-extract-png.c:243:46: call_function: calling ‘raw_profile_new’ from ‘read_metadata’
#  174|   	}
#  175|   
#  176|-> 	output[o] = '\0';
#  177|   	*output_length = o;
#  178|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def37]
localsearch-3.10.2/src/extractor/tracker-extract.h:29:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘extract’
localsearch-3.10.2/src/extractor/tracker-main.c:309:1: enter_function: entry to ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:332:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:337:13: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:337:13: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:348:13: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:348:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:353:9: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:357:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:360:9: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:363:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:367:13: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:367:12: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:371:26: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:373:20: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:374:34: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:368:37: call_function: inlined call to ‘glib_autoptr_cleanup_GSocket’ from ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:385:12: branch_false: following ‘false’ branch (when ‘connection’ is non-NULL)...
localsearch-3.10.2/src/extractor/tracker-main.c:391:19: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:398:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/tracker-main.c:404:23: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-main.c:317:37: call_function: inlined call to ‘glib_autoptr_cleanup_GDBusConnection’ from ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:316:31: call_function: inlined call to ‘glib_autoptr_cleanup_GMainLoop’ from ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:315:46: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerExtractController’ from ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:314:38: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerDecorator’ from ‘do_main’
localsearch-3.10.2/src/extractor/tracker-main.c:313:36: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerExtract’ from ‘do_main’
#   27|   
#   28|   #define TRACKER_TYPE_EXTRACT (tracker_extract_get_type ())
#   29|-> G_DECLARE_FINAL_TYPE (TrackerExtract,
#   30|   		      tracker_extract,
#   31|   		      TRACKER, EXTRACT,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
localsearch-3.10.2/src/extractor/tracker-read.c:132:33: warning[-Wanalyzer-malloc-leak]: leak of ‘fz’
localsearch-3.10.2/src/extractor/tracker-read.c:258:1: enter_function: entry to ‘tracker_read_text_from_fd’
localsearch-3.10.2/src/extractor/tracker-read.c:266:19: acquire_memory: allocated here
localsearch-3.10.2/src/extractor/tracker-read.c:266:12: branch_false: following ‘false’ branch (when ‘fz’ is non-NULL)...
localsearch-3.10.2/src/extractor/tracker-read.c:273:13: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-read.c:283:16: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-read.c:290:39: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-read.c:294:22: call_function: calling ‘process_chunk’ from ‘tracker_read_text_from_fd’
#  130|   
#  131|   			if (!eol_found) {
#  132|-> 				g_debug ("  No '\\n' in the first %" G_GSSIZE_FORMAT " bytes, "
#  133|   				         "not indexing file",
#  134|   				         read_size);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
localsearch-3.10.2/src/extractor/tracker-read.c:143:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fz’
localsearch-3.10.2/src/extractor/tracker-read.c:258:1: enter_function: entry to ‘tracker_read_text_from_fd’
localsearch-3.10.2/src/extractor/tracker-read.c:266:19: acquire_memory: allocated here
localsearch-3.10.2/src/extractor/tracker-read.c:266:12: branch_false: following ‘false’ branch (when ‘fz’ is non-NULL)...
localsearch-3.10.2/src/extractor/tracker-read.c:273:13: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-read.c:283:16: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-read.c:290:39: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-read.c:294:22: call_function: calling ‘process_chunk’ from ‘tracker_read_text_from_fd’
#  141|   	*remaining_size -= read_size;
#  142|   
#  143|-> 	g_debug ("  Read "
#  144|   	         "%" G_GSSIZE_FORMAT " bytes from file, %" G_GSIZE_FORMAT " "
#  145|   	         "bytes remaining until configured threshold is reached",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
localsearch-3.10.2/src/extractor/tracker-read.c:273:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fz’
localsearch-3.10.2/src/extractor/tracker-read.c:266:19: acquire_memory: allocated here
localsearch-3.10.2/src/extractor/tracker-read.c:266:12: branch_false: following ‘false’ branch (when ‘fz’ is non-NULL)...
localsearch-3.10.2/src/extractor/tracker-read.c:273:13: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-read.c:273:13: throw: if ‘g_string_new’ throws an exception...
localsearch-3.10.2/src/extractor/tracker-read.c:273:13: danger: ‘fz’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  271|   	}
#  272|   
#  273|-> 	s = g_string_new ("");
#  274|   
#  275|   	/* Reading in chunks of BUFFER_SIZE

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
localsearch-3.10.2/src/extractor/tracker-read.c:306:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fz’
localsearch-3.10.2/src/extractor/tracker-read.c:266:19: acquire_memory: allocated here
localsearch-3.10.2/src/extractor/tracker-read.c:266:12: branch_false: following ‘false’ branch (when ‘fz’ is non-NULL)...
localsearch-3.10.2/src/extractor/tracker-read.c:273:13: branch_false: ...to here
localsearch-3.10.2/src/extractor/tracker-read.c:305:12: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/tracker-read.c:306:17: branch_true: ...to here
localsearch-3.10.2/src/extractor/tracker-read.c:306:17: throw: if ‘g_log’ throws an exception...
localsearch-3.10.2/src/extractor/tracker-read.c:306:17: danger: ‘fz’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  304|   #ifdef HAVE_POSIX_FADVISE
#  305|   	if (posix_fadvise (fd, 0, 0, POSIX_FADV_DONTNEED) != 0)
#  306|-> 		g_warning ("posix_fadvise() call failed: %m");
#  307|   #endif /* HAVE_POSIX_FADVISE */
#  308|   	fclose (fz);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def42]
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:104:33: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:98:9: acquire_resource: ‘va_start’ called here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:100:21: branch_true: following ‘true’ branch (when ‘i < n_values’)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:103:17: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:104:33: throw: if ‘tracker_is_blank_string’ throws an exception...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:104:33: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0)
#  102|   
#  103|   		value = va_arg (args, gchar *);
#  104|-> 		if (!result && !tracker_is_blank_string (value)) {
#  105|   			result = (const gchar *) g_strstrip (value);
#  106|   			break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def43]
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:105:50: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:98:9: acquire_resource: ‘va_start’ called here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:100:21: branch_true: following ‘true’ branch (when ‘i < n_values’)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:103:17: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:105:50: throw: if ‘g_strchug’ throws an exception...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:105:50: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  103|   		value = va_arg (args, gchar *);
#  104|   		if (!result && !tracker_is_blank_string (value)) {
#  105|-> 			result = (const gchar *) g_strstrip (value);
#  106|   			break;
#  107|   		}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def44]
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:152:33: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:146:9: acquire_resource: ‘va_start’ called here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:148:21: branch_true: following ‘true’ branch (when ‘i < n_values’)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:151:17: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:152:20: branch_true: following ‘true’ branch (when ‘result’ is NULL)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:152:33: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:152:33: throw: if ‘tracker_is_blank_string’ throws an exception...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:152:33: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
#  150|   
#  151|   		value = va_arg (args, gchar *);
#  152|-> 		if (!result && !tracker_is_blank_string (value)) {
#  153|   			result = g_strstrip (value);
#  154|   		} else {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def45]
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:153:34: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:146:9: acquire_resource: ‘va_start’ called here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:148:21: branch_true: following ‘true’ branch (when ‘i < n_values’)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:151:17: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:152:20: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:153:34: throw: if ‘g_strchug’ throws an exception...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:153:34: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  151|   		value = va_arg (args, gchar *);
#  152|   		if (!result && !tracker_is_blank_string (value)) {
#  153|-> 			result = g_strstrip (value);
#  154|   		} else {
#  155|   			g_free (value);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def46]
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:155:25: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:146:9: acquire_resource: ‘va_start’ called here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:148:21: branch_true: following ‘true’ branch (when ‘i < n_values’)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:151:17: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:152:20: branch_true: following ‘true’ branch (when ‘result’ is NULL)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:152:33: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:152:21: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:155:25: branch_false: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:155:25: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:155:25: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:155:25: throw: if ‘g_free_sized’ throws an exception...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:155:25: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  153|   			result = g_strstrip (value);
#  154|   		} else {
#  155|-> 			g_free (value);
#  156|   		}
#  157|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def47]
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:200:39: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:192:9: acquire_resource: ‘va_start’ called here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:194:21: branch_true: following ‘true’ branch (when ‘i < n_values’)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:197:17: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:198:20: branch_true: following ‘true’ branch (when ‘value’ is non-NULL)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:199:28: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:199:28: branch_true: following ‘true’ branch (when ‘str’ is NULL)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:200:39: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:200:39: throw: if ‘g_string_new’ throws an exception...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:200:39: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
#  198|   		if (value) {
#  199|   			if (!str) {
#  200|-> 				str = g_string_new (value);
#  201|   			} else {
#  202|   				if (delimiter) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def48]
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:258:39: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:250:9: acquire_resource: ‘va_start’ called here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:252:21: branch_true: following ‘true’ branch (when ‘i < n_values’)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:255:17: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:256:20: branch_true: following ‘true’ branch (when ‘value’ is non-NULL)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:257:28: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:257:28: branch_true: following ‘true’ branch (when ‘str’ is NULL)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:258:39: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:258:39: throw: if ‘g_string_new’ throws an exception...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:258:39: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0)
#  256|   		if (value) {
#  257|   			if (!str) {
#  258|-> 				str = g_string_new (value);
#  259|   			} else {
#  260|   				if (delimiter) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def49]
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:265:25: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:250:9: acquire_resource: ‘va_start’ called here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:252:21: branch_true: following ‘true’ branch (when ‘i < n_values’)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:255:17: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:256:20: branch_true: following ‘true’ branch (when ‘value’ is non-NULL)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:257:28: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:257:28: branch_true: following ‘true’ branch (when ‘str’ is NULL)...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:258:39: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:265:25: branch_true: following ‘true’ branch...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:265:25: branch_true: ...to here
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:265:25: throw: if ‘g_free_sized’ throws an exception...
localsearch-3.10.2/src/extractor/utils/tracker-utils.c:265:25: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/0)
#  263|   				g_string_append (str, value);
#  264|   			}
#  265|-> 			g_free (value);
#  266|   		}
#  267|   	}

Error: COMPILER_WARNING (CWE-704): [#def50]
localsearch-3.10.2/src/extractor/utils/tracker-xmp.c: scope_hint: In function ‘div_str_dup’
localsearch-3.10.2/src/extractor/utils/tracker-xmp.c:207:22: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  207 |         gchar *ptr = strchr (value, '/');
#      |                      ^~~~~~
#  205|   {
#  206|   	gchar *ret;
#  207|-> 	gchar *ptr = strchr (value, '/');
#  208|   
#  209|   	if (ptr) {

Error: COMPILER_WARNING (CWE-704): [#def51]
localsearch-3.10.2/src/extractor/utils/tracker-xmp.c:207:22: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#  205|   {
#  206|   	gchar *ret;
#  207|-> 	gchar *ptr = strchr (value, '/');
#  208|   
#  209|   	if (ptr) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def52]
localsearch-3.10.2/src/indexer/tracker-controller.h:14:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘controller’
localsearch-3.10.2/src/indexer/tracker-application.c:571:1: enter_function: entry to ‘check_eligible’
localsearch-3.10.2/src/indexer/tracker-application.c:664:20: branch_false: following ‘false’ branch (when ‘is_dir == 0’)...
localsearch-3.10.2/src/indexer/tracker-application.c:669:28: branch_false: ...to here
localsearch-3.10.2/src/indexer/tracker-application.c:680:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/indexer/tracker-application.c:687:17: branch_false: ...to here
localsearch-3.10.2/src/indexer/tracker-application.c:576:27: call_function: inlined call to ‘glib_autoptr_cleanup_GFile’ from ‘check_eligible’
localsearch-3.10.2/src/indexer/tracker-application.c:575:39: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerController’ from ‘check_eligible’
#   12|   
#   13|   #define TRACKER_TYPE_CONTROLLER (tracker_controller_get_type ())
#   14|-> G_DECLARE_FINAL_TYPE (TrackerController, tracker_controller, TRACKER, CONTROLLER, GObject)
#   15|   
#   16|   TrackerController * tracker_controller_new (TrackerIndexingTree   *tree,

Error: GCC_ANALYZER_WARNING (CWE-457): [#def53]
localsearch-3.10.2/src/indexer/tracker-indexing-tree.h:77:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘indexing_tree’
localsearch-3.10.2/src/indexer/tracker-application.c:571:1: enter_function: entry to ‘check_eligible’
localsearch-3.10.2/src/indexer/tracker-application.c:664:20: branch_false: following ‘false’ branch (when ‘is_dir == 0’)...
localsearch-3.10.2/src/indexer/tracker-application.c:669:28: branch_false: ...to here
localsearch-3.10.2/src/indexer/tracker-application.c:680:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/indexer/tracker-application.c:687:17: branch_false: ...to here
localsearch-3.10.2/src/indexer/tracker-application.c:574:36: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerStorage’ from ‘check_eligible’
localsearch-3.10.2/src/indexer/tracker-application.c:573:41: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerIndexingTree’ from ‘check_eligible’
#   75|   } TrackerIndexingTreeClass;
#   76|   
#   77|-> G_DEFINE_AUTOPTR_CLEANUP_FUNC (TrackerIndexingTree, g_object_unref)
#   78|   
#   79|   GType                 tracker_indexing_tree_get_type (void) G_GNUC_CONST;

Error: COMPILER_WARNING (CWE-477): [#def54]
localsearch-3.10.2/src/indexer/tracker-storage.c: scope_hint: In function ‘mount_guess_content_type’
localsearch-3.10.2/src/indexer/tracker-storage.c:463:21: warning[-Wdeprecated-declarations]: ‘g_unix_mount_at’ is deprecated: Use 'g_unix_mount_entry_at' instead
#  463 |                     (entry = g_unix_mount_at (mount_path, NULL)) != NULL) {
#      |                     ^
localsearch-3.10.2/src/indexer/tracker-storage.c:25: included_from: Included from here.
/usr/include/gio-unix-2.0/gio/gunixmounts.h:213:18: note: declared here
#  213 | GUnixMountEntry *g_unix_mount_at                    (const char         *mount_path,
#      |                  ^~~~~~~~~~~~~~~
#  461|   		 */
#  462|   		if (mount_path &&
#  463|-> 		    (entry = g_unix_mount_at (mount_path, NULL)) != NULL) {
#  464|   			const gchar *filesystem_type;
#  465|   			gchar *device_path = NULL;

Error: COMPILER_WARNING (CWE-477): [#def55]
localsearch-3.10.2/src/indexer/tracker-storage.c:463:21: warning[-Wdeprecated-declarations]: ‘g_unix_mount_at’ is deprecated: Use 'g_unix_mount_entry_at' instead
#  461|   		 */
#  462|   		if (mount_path &&
#  463|-> 		    (entry = g_unix_mount_at (mount_path, NULL)) != NULL) {
#  464|   			const gchar *filesystem_type;
#  465|   			gchar *device_path = NULL;

Error: COMPILER_WARNING (CWE-477): [#def56]
localsearch-3.10.2/src/indexer/tracker-storage.c:469:25: warning[-Wdeprecated-declarations]: ‘g_unix_mount_get_fs_type’ is deprecated: Use 'g_unix_mount_entry_get_fs_type' instead
#  469 |                         filesystem_type = g_unix_mount_get_fs_type (entry);
#      |                         ^~~~~~~~~~~~~~~
/usr/include/gio-unix-2.0/gio/gunixmounts.h:115:16: note: declared here
#  115 | const char *   g_unix_mount_get_fs_type             (GUnixMountEntry    *mount_entry);
#      |                ^~~~~~~~~~~~~~~~~~~~~~~~
#  467|   
#  468|   			volume = g_mount_get_volume (mount);
#  469|-> 			filesystem_type = g_unix_mount_get_fs_type (entry);
#  470|   			g_debug ("  Using filesystem type:'%s'",
#  471|   			         filesystem_type);

Error: COMPILER_WARNING (CWE-477): [#def57]
localsearch-3.10.2/src/indexer/tracker-storage.c:469:25: warning[-Wdeprecated-declarations]: ‘g_unix_mount_get_fs_type’ is deprecated: Use 'g_unix_mount_entry_get_fs_type' instead
#  467|   
#  468|   			volume = g_mount_get_volume (mount);
#  469|-> 			filesystem_type = g_unix_mount_get_fs_type (entry);
#  470|   			g_debug ("  Using filesystem type:'%s'",
#  471|   			         filesystem_type);

Error: COMPILER_WARNING (CWE-477): [#def58]
localsearch-3.10.2/src/indexer/tracker-storage.c:524:25: warning[-Wdeprecated-declarations]: ‘g_unix_mount_free’ is deprecated: Use 'g_unix_mount_entry_free' instead
#  524 |                         g_unix_mount_free (entry);
#      |                         ^~~~~~~~~~~~~~~~~
/usr/include/gio-unix-2.0/gio/gunixmounts.h:78:16: note: declared here
#   78 | void           g_unix_mount_free                    (GUnixMountEntry    *mount_entry);
#      |                ^~~~~~~~~~~~~~~~~
#  522|   			g_free (device_path);
#  523|   			g_free (mount_path);
#  524|-> 			g_unix_mount_free (entry);
#  525|   		} else {
#  526|   			g_debug ("  No GUnixMountEntry found, needed for detecting if optical media... :(");

Error: COMPILER_WARNING (CWE-477): [#def59]
localsearch-3.10.2/src/indexer/tracker-storage.c:524:25: warning[-Wdeprecated-declarations]: ‘g_unix_mount_free’ is deprecated: Use 'g_unix_mount_entry_free' instead
#  522|   			g_free (device_path);
#  523|   			g_free (mount_path);
#  524|-> 			g_unix_mount_free (entry);
#  525|   		} else {
#  526|   			g_debug ("  No GUnixMountEntry found, needed for detecting if optical media... :(");

Error: GCC_ANALYZER_WARNING (CWE-688): [#def60]
localsearch-3.10.2/src/indexer/tracker-storage.c:889:23: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
localsearch-3.10.2/src/indexer/tracker-storage.c:868:1: enter_function: entry to ‘get_mount_point_by_uuid_foreach’
localsearch-3.10.2/src/indexer/tracker-storage.c:889:23: danger: argument 1 (‘<unknown>’) NULL where non-null expected
#  887|   
#  888|   		normalized_mount_point = g_strdup (info->mount_point);
#  889|-> 		len = strlen (normalized_mount_point);
#  890|   
#  891|   		/* Don't include trailing slashes */

Error: GCC_ANALYZER_WARNING (CWE-457): [#def61]
localsearch-3.10.2/src/indexer/tracker-storage.h:67:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘storage’
localsearch-3.10.2/src/indexer/tracker-application.c:571:1: enter_function: entry to ‘check_eligible’
localsearch-3.10.2/src/indexer/tracker-application.c:664:20: branch_false: following ‘false’ branch (when ‘is_dir == 0’)...
localsearch-3.10.2/src/indexer/tracker-application.c:669:28: branch_false: ...to here
localsearch-3.10.2/src/indexer/tracker-application.c:680:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/src/indexer/tracker-application.c:687:17: branch_false: ...to here
localsearch-3.10.2/src/indexer/tracker-application.c:575:39: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerController’ from ‘check_eligible’
localsearch-3.10.2/src/indexer/tracker-application.c:574:36: call_function: inlined call to ‘glib_autoptr_cleanup_TrackerStorage’ from ‘check_eligible’
#   65|   
#   66|   #define TRACKER_TYPE_STORAGE (tracker_storage_get_type ())
#   67|-> G_DECLARE_FINAL_TYPE (TrackerStorage,
#   68|                         tracker_storage,
#   69|                         TRACKER, STORAGE,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def62]
localsearch-3.10.2/tests/extract-utils/tracker-utils-test.c:270:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/builddir/build/BUILD/localsearch-3.10.2//tests/extract-utils/getline-test.txt", "r")’
localsearch-3.10.2/tests/extract-utils/tracker-utils-test.c:269:13: acquire_resource: opened here
localsearch-3.10.2/tests/extract-utils/tracker-utils-test.c:270:9: throw: if ‘tracker_getline’ throws an exception...
localsearch-3.10.2/tests/extract-utils/tracker-utils-test.c:270:9: danger: ‘fopen("/builddir/build/BUILD/localsearch-3.10.2//tests/extract-utils/getline-test.txt", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  268|    
#  269|           f = fopen (TOP_SRCDIR "/tests/extract-utils/getline-test.txt", "r");
#  270|->         g_assert_cmpint (tracker_getline (&line, &n, f), >, 0);
#  271|           g_assert_cmpstr (line, ==, "Line 1\n");
#  272|           g_free (line);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
localsearch-3.10.2/tests/extract-utils/tracker-utils-test.c:270:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/builddir/build/BUILD/localsearch-3.10.2//tests/extract-utils/getline-test.txt", "r")’
localsearch-3.10.2/tests/extract-utils/tracker-utils-test.c:269:13: acquire_memory: allocated here
localsearch-3.10.2/tests/extract-utils/tracker-utils-test.c:270:9: throw: if ‘tracker_getline’ throws an exception...
localsearch-3.10.2/tests/extract-utils/tracker-utils-test.c:270:9: danger: ‘fopen("/builddir/build/BUILD/localsearch-3.10.2//tests/extract-utils/getline-test.txt", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  268|    
#  269|           f = fopen (TOP_SRCDIR "/tests/extract-utils/getline-test.txt", "r");
#  270|->         g_assert_cmpint (tracker_getline (&line, &n, f), >, 0);
#  271|           g_assert_cmpstr (line, ==, "Line 1\n");
#  272|           g_free (line);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def64]
localsearch-3.10.2/tests/functional-tests/mockvolumemonitor/mock-mount.h:34:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘mount’
localsearch-3.10.2/tests/functional-tests/mockvolumemonitor/mock-volume-monitor.c:110:9: throw: if ‘g_log’ throws an exception...
localsearch-3.10.2/tests/functional-tests/mockvolumemonitor/mock-volume-monitor.c:107:30: call_function: inlined call to ‘glib_autoptr_cleanup_MockMount’ from ‘remove_mock_mount’
#   32|   
#   33|   #define MOCK_TYPE_MOUNT  (mock_mount_get_type ())
#   34|-> G_DECLARE_FINAL_TYPE (MockMount, mock_mount, MOCK, MOUNT, GObject)
#   35|   
#   36|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read-trunc/fs-read-trunc.c:16:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_file_get_path(tracker_extract_info_get_file(info)), 512)’
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read-trunc/fs-read-trunc.c:15:14: acquire_resource: opened here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read-trunc/fs-read-trunc.c:16:12: danger: ‘open(g_file_get_path(tracker_extract_info_get_file(info)), 512)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   14|   	/* Attempt to truncate the file */
#   15|   	fd = open (path, O_RDONLY | O_TRUNC);
#   16|-> 	if (fd >= 0)
#   17|   		goto fail;
#   18|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def66]
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:15:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/proc/cmdline", 0)’
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:14:14: acquire_resource: opened here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:15:12: danger: ‘open("/proc/cmdline", 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   13|   	/* Attempt to read files from disallowed locations */
#   14|   	fd = open ("/proc/cmdline", O_RDONLY);
#   15|-> 	if (fd >= 0)
#   16|   		goto fail;
#   17|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:19:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/etc/motd", 0)’
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:15:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:18:14: branch_false: ...to here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:18:14: acquire_resource: opened here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:19:12: danger: ‘open("/etc/motd", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   17|   
#   18|   	fd = open ("/etc/motd", O_RDONLY);
#   19|-> 	if (fd >= 0)
#   20|   		goto fail;
#   21|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def68]
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:24:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_path_get_dirname(g_get_home_dir()), 65536)’
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:15:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:18:14: branch_false: ...to here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:19:12: branch_false: following ‘false’ branch...
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:22:23: branch_false: ...to here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:23:14: acquire_resource: opened here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-read/fs-read.c:24:12: danger: ‘open(g_path_get_dirname(g_get_home_dir()), 65536)’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#   22|   	home_parent = g_path_get_dirname (g_get_home_dir ());
#   23|   	fd = open (home_parent, O_RDONLY | O_DIRECTORY);
#   24|-> 	if (fd >= 0)
#   25|   		goto fail;
#   26|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def69]
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-write/fs-write.c:15:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 1)’
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-write/fs-write.c:14:14: acquire_resource: opened here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/fs-write/fs-write.c:15:12: danger: ‘open(path, 1)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   13|   
#   14|   	fd = open (path, O_WRONLY);
#   15|-> 	if (fd >= 0)
#   16|   		return fd;
#   17|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def70]
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:46:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:18:14: acquire_resource: stream socket created here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:19:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:20:17: branch_true: ...to here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:46:20: throw: if ‘tracker_resource_new’ throws an exception...
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:46:20: danger: ‘fd’ leaks here
#   44|    fail:
#   45|   	/* Hint unexpected success with a fail:// resource */
#   46|-> 	resource = tracker_resource_new ("fail://");
#   47|   	tracker_resource_add_uri (resource, "rdf:type", "rdfs:Resource");
#   48|   	tracker_extract_info_set_resource (info, resource);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:47:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:18:14: acquire_resource: stream socket created here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:19:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:20:17: branch_true: ...to here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:47:9: throw: if ‘tracker_resource_add_uri’ throws an exception...
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:47:9: danger: ‘fd’ leaks here
#   45|   	/* Hint unexpected success with a fail:// resource */
#   46|   	resource = tracker_resource_new ("fail://");
#   47|-> 	tracker_resource_add_uri (resource, "rdf:type", "rdfs:Resource");
#   48|   	tracker_extract_info_set_resource (info, resource);
#   49|   	close (fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def72]
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:48:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:18:14: acquire_resource: stream socket created here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:19:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:20:17: branch_true: ...to here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:48:9: throw: if ‘tracker_extract_info_set_resource’ throws an exception...
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:48:9: danger: ‘fd’ leaks here
#   46|   	resource = tracker_resource_new ("fail://");
#   47|   	tracker_resource_add_uri (resource, "rdf:type", "rdfs:Resource");
#   48|-> 	tracker_extract_info_set_resource (info, resource);
#   49|   	close (fd);
#   50|   	return TRUE;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def73]
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:49:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:18:14: acquire_resource: stream socket created here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:19:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:20:17: branch_true: ...to here
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:49:9: throw: if ‘close’ throws an exception...
localsearch-3.10.2/tests/functional-tests/test-extractor-modules/malice/net-access/net-access.c:49:9: danger: ‘fd’ leaks here
#   47|   	tracker_resource_add_uri (resource, "rdf:type", "rdfs:Resource");
#   48|   	tracker_extract_info_set_resource (info, resource);
#   49|-> 	close (fd);
#   50|   	return TRUE;
#   51|   }

Error: COMPILER_WARNING (CWE-252): [#def74]
localsearch-3.10.2/tests/indexer/tracker-file-notifier-test.c: scope_hint: In function ‘perform_file_operation’
localsearch-3.10.2/tests/indexer/tracker-file-notifier-test.c:116:9: warning[-Wunused-result]: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’
#  116 |         system (call);
#      |         ^~~~~~~~~~~~~
#  114|   	}
#  115|   
#  116|-> 	system (call);
#  117|   
#  118|   	g_free (call);

Error: COMPILER_WARNING (CWE-252): [#def75]
localsearch-3.10.2/tests/indexer/tracker-miner-fs-test.c: scope_hint: In function ‘perform_file_operation’
localsearch-3.10.2/tests/indexer/tracker-miner-fs-test.c:228:9: warning[-Wunused-result]: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’
#  228 |         system (call);
#      |         ^~~~~~~~~~~~~
#  226|   	}
#  227|   
#  228|-> 	system (call);
#  229|   
#  230|   	g_free (call);

Error: CPPCHECK_WARNING (CWE-476): [#def76]
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:535: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: file
#  533|   	g_assert_true (file != NULL);
#  534|   	length = strlen (contents);
#  535|-> 	g_assert_cmpint (fwrite (contents, 1, length, file), >=, length);
#  536|   	g_assert_cmpint (fflush (file), ==, 0);
#  537|   	g_assert_cmpint (fclose (file), !=, EOF);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def77]
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:535:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_build_filename(directory,  filename, 0), "wb")’
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:532:16: acquire_resource: opened here
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:533:9: branch_true: following ‘true’ branch...
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:534:18: branch_true: ...to here
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:535:9: branch_false: following ‘false’ branch (when ‘__n1 < __n2’)...
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:535:9: branch_false: ...to here
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:535:9: throw: if ‘g_assertion_message_cmpint’ throws an exception...
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:535:9: danger: ‘fopen(g_build_filename(directory,  filename, 0), "wb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  533|   	g_assert_true (file != NULL);
#  534|   	length = strlen (contents);
#  535|-> 	g_assert_cmpint (fwrite (contents, 1, length, file), >=, length);
#  536|   	g_assert_cmpint (fflush (file), ==, 0);
#  537|   	g_assert_cmpint (fclose (file), !=, EOF);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:535:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_build_filename(directory,  filename, 0), "wb")’
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:532:16: acquire_memory: allocated here
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:533:9: branch_true: following ‘true’ branch...
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:534:18: branch_true: ...to here
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:535:9: branch_false: following ‘false’ branch (when ‘__n1 < __n2’)...
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:535:9: branch_false: ...to here
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:535:9: throw: if ‘g_assertion_message_cmpint’ throws an exception...
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:535:9: danger: ‘fopen(g_build_filename(directory,  filename, 0), "wb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  533|   	g_assert_true (file != NULL);
#  534|   	length = strlen (contents);
#  535|-> 	g_assert_cmpint (fwrite (contents, 1, length, file), >=, length);
#  536|   	g_assert_cmpint (fflush (file), ==, 0);
#  537|   	g_assert_cmpint (fclose (file), !=, EOF);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def79]
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:535:9: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(g_build_filename(directory,  filename, 0), "wb")’ where non-null expected
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:532:16: acquire_memory: allocated here
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:533:9: release_memory: assuming ‘fopen(g_build_filename(directory,  filename, 0), "wb")’ is NULL
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:533:9: branch_false: following ‘false’ branch...
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:533:9: branch_false: ...to here
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:535:9: danger: argument 4 (‘fopen(g_build_filename(directory,  filename, 0), "wb")’) NULL where non-null expected
#  533|   	g_assert_true (file != NULL);
#  534|   	length = strlen (contents);
#  535|-> 	g_assert_cmpint (fwrite (contents, 1, length, file), >=, length);
#  536|   	g_assert_cmpint (fflush (file), ==, 0);
#  537|   	g_assert_cmpint (fclose (file), !=, EOF);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def80]
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:536:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_build_filename(directory,  filename, 0), "wb")’
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:532:16: acquire_resource: opened here
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:533:9: branch_true: following ‘true’ branch...
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:534:18: branch_true: ...to here
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:536:9: throw: if ‘fflush’ throws an exception...
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:536:9: danger: ‘fopen(g_build_filename(directory,  filename, 0), "wb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  534|   	length = strlen (contents);
#  535|   	g_assert_cmpint (fwrite (contents, 1, length, file), >=, length);
#  536|-> 	g_assert_cmpint (fflush (file), ==, 0);
#  537|   	g_assert_cmpint (fclose (file), !=, EOF);
#  538|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:536:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_build_filename(directory,  filename, 0), "wb")’
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:532:16: acquire_memory: allocated here
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:533:9: branch_true: following ‘true’ branch...
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:534:18: branch_true: ...to here
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:536:9: throw: if ‘fflush’ throws an exception...
localsearch-3.10.2/tests/indexer/tracker-monitor-test.c:536:9: danger: ‘fopen(g_build_filename(directory,  filename, 0), "wb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  534|   	length = strlen (contents);
#  535|   	g_assert_cmpint (fwrite (contents, 1, length, file), >=, length);
#  536|-> 	g_assert_cmpint (fflush (file), ==, 0);
#  537|   	g_assert_cmpint (fclose (file), !=, EOF);
#  538|   

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-207.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelocalsearch-3.10.2-1.fc44
store-results-to/tmp/tmpt2hf5d2t/localsearch-3.10.2-1.fc44.tar.xz
time-created2026-01-08 19:24:57
time-finished2026-01-08 19:27:39
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpt2hf5d2t/localsearch-3.10.2-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpt2hf5d2t/localsearch-3.10.2-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9