Task #137147 - fixed.err
back to task #137147download
Error: GCC_ANALYZER_WARNING (CWE-688):
conmon-2.2.1/src/conn_sock.c: scope_hint: In function ‘bind_unix_socket’
conmon-2.2.1/src/conn_sock.c:234:45: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘socket_parent_dir(use_full_attach_path, 108)’ where non-null expected
/usr/include/glib-2.0/glib-unix.h:34: included_from: Included from here.
conmon-2.2.1/src/utils.h:11: included_from: Included from here.
conmon-2.2.1/src/conn_sock.c:6: included_from: Included from here.
/usr/include/fcntl.h:209:12: note: argument 1 of ‘open’ must be non-null
# 232| * to actually refer to the file where the socket will be created below.
# 233| */
# 234|-> _cleanup_close_ int parent_dir_fd = open(parent_dir, O_PATH | O_CLOEXEC);
# 235| if (parent_dir_fd < 0)
# 236| pexitf("failed to open socket path parent dir %s", parent_dir);
Error: GCC_ANALYZER_WARNING (CWE-401):
conmon-2.2.1/src/conn_sock.c:277:24: warning[-Wanalyzer-malloc-leak]: leak of ‘socket_parent_dir(use_full_attach_path, 108)’
conmon-2.2.1/src/conn_sock.c:236:17: note: in expansion of macro ‘pexitf’
# 275| /* if we're to use the full path, ignore the socket path and only use the bundle_path */
# 276| if (use_full_attach_path)
# 277|-> return strdup(opt_bundle_path);
# 278|
# 279| char *base_path = g_build_filename(opt_socket_path, opt_cuuid, NULL);