Task #71028 - added.err

back to task #71028
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:729: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:723:21: note: in expansion of macro ‘g_strdup’
conmon-2.1.13/src/ctr_logging.c: scope_hint: In function ‘path_contains_symlinks_atomic’
#  727|   	/* Start from root if absolute path */
#  728|   	if (path_copy[0] == '/') {
#  729|-> 		current_fd = open("/", O_PATH | O_CLOEXEC);
#  730|   		if (current_fd < 0)
#  731|   			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:910:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_path_get_dirname(path), 2621440)’
#  908|   
#  909|   	/* Open parent directory with O_PATH for safe operations */
#  910|-> 	parent_fd = open(parent_dir, O_PATH | O_CLOEXEC);
#  911|   	if (parent_fd < 0)
#  912|   		return -1;