Task #71685 - added.err

back to task #71685
download
Error: GCC_ANALYZER_WARNING (CWE-775):
conmon-2.1.13/src/ctr_logging.c: scope_hint: In function ‘path_contains_symlinks_atomic’
conmon-2.1.13/src/ctr_logging.c:796:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/", 2621440)’
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
conmon-2.1.13/src/utils.h:10: included_from: Included from here.
conmon-2.1.13/src/ctr_logging.h:5: included_from: Included from here.
conmon-2.1.13/src/ctr_logging.c:2: included_from: Included from here.
conmon-2.1.13/src/ctr_logging.c:790:21: note: in expansion of macro ‘g_strdup’
conmon-2.1.13/src/ctr_logging.c: scope_hint: In function ‘path_contains_symlinks_atomic’
#  794|   	/* Start from root if absolute path */
#  795|   	if (path_copy[0] == '/') {
#  796|-> 		current_fd = open("/", O_PATH | O_CLOEXEC);
#  797|   		if (current_fd < 0)
#  798|   			return TRUE;

Error: GCC_ANALYZER_WARNING (CWE-775):
conmon-2.1.13/src/ctr_logging.c: scope_hint: In function ‘secure_validate_log_path’
conmon-2.1.13/src/ctr_logging.c:970:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_path_get_dirname(path), 2621440)’
#  968|   
#  969|   	/* Open parent directory with O_PATH for safe operations */
#  970|-> 	parent_fd = open(parent_dir, O_PATH | O_CLOEXEC);
#  971|   	if (parent_fd < 0)
#  972|   		return -1;