Error: SHELLCHECK_WARNING (CWE-477): [#def1] /etc/gdm/Init/Default:86:29: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 84| if [ -n "$XKBKEYMAP" ]; then # 85| $SETXKBMAP -keymap "$XKBKEYMAP" # 86|-> elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBGEOMETRY" ]; then # 87| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY" # 88| elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def2] /etc/gdm/Init/Default:86:48: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 84| if [ -n "$XKBKEYMAP" ]; then # 85| $SETXKBMAP -keymap "$XKBKEYMAP" # 86|-> elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBGEOMETRY" ]; then # 87| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY" # 88| elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def3] /etc/gdm/Init/Default:86:68: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 84| if [ -n "$XKBKEYMAP" ]; then # 85| $SETXKBMAP -keymap "$XKBKEYMAP" # 86|-> elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBGEOMETRY" ]; then # 87| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY" # 88| elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def4] /etc/gdm/Init/Default:88:29: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 86| elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBGEOMETRY" ]; then # 87| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY" # 88|-> elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then # 89| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" # 90| elif [ -n "$XKBSYMBOLS" ]; then Error: SHELLCHECK_WARNING (CWE-477): [#def5] /etc/gdm/Init/Default:88:48: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 86| elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBGEOMETRY" ]; then # 87| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY" # 88|-> elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then # 89| $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" # 90| elif [ -n "$XKBSYMBOLS" ]; then Error: CPPCHECK_WARNING (CWE-457): [#def6] gdm-47.0-build/gdm-47.0/common/gdm-settings.c:106: warning[uninitvar]: Uninitialized variable: res # 104| break; # 105| } # 106|-> if (! res) { # 107| g_propagate_error (error, local_error); # 108| } Error: CPPCHECK_WARNING (CWE-457): [#def7] gdm-47.0-build/gdm-47.0/common/gdm-settings.c:148: warning[uninitvar]: Uninitialized variable: res # 146| } # 147| # 148|-> if (! res) { # 149| g_propagate_error (error, local_error); # 150| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c: scope_hint: In function ‘gdm_display_access_file_open’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:216:28: warning[-Wanalyzer-malloc-leak]: leak of ‘_create_xauth_file_for_user(*file.username, &*file.path, & create_error)’ /usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here. /usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here. /usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here. /usr/include/glib-2.0/glib.h:32: included_from: Included from here. gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:34: included_from: Included from here. /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:394:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:395:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:395:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:396:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:396:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:258:9: note: in expansion of macro ‘g_assert’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:205:9: note: in expansion of macro ‘g_assert’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:206:9: note: in expansion of macro ‘g_assert’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:206:9: note: in expansion of macro ‘g_assert’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:207:9: note: in expansion of macro ‘g_assert’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:207:9: note: in expansion of macro ‘g_assert’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:25: included_from: Included from here. /usr/include/glib-2.0/glib.h:64: included_from: Included from here. gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:322:9: note: in expansion of macro ‘g_debug’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:354:9: note: in expansion of macro ‘g_debug’ gdm-47.0-build/gdm-47.0/daemon/gdm-display-access-file.c:368:9: note: in expansion of macro ‘g_debug’ # 214| } # 215| # 216|-> *uid = passwd_entry->pw_uid; # 217| *gid = passwd_entry->pw_gid; # 218| Error: COMPILER_WARNING (CWE-457): [#def9] gdm-47.0-build/gdm-47.0/daemon/gdm-display.c: scope_hint: In function ‘handle_is_local’ gdm-47.0-build/gdm-47.0/daemon/gdm-display.c:1158:9: warning[-Wmaybe-uninitialized]: ‘is_local’ may be used uninitialized # 1158 | gdm_dbus_display_complete_is_local (skeleton, invocation, is_local); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gdm-47.0-build/gdm-47.0/daemon/gdm-display.c:1154:18: note: ‘is_local’ was declared here # 1154 | gboolean is_local; # | ^~~~~~~~ # 1156| gdm_display_is_local (self, &is_local, NULL); # 1157| # 1158|-> gdm_dbus_display_complete_is_local (skeleton, invocation, is_local); # 1159| # 1160| return TRUE; Error: COMPILER_WARNING (CWE-563): [#def10] gdm-47.0-build/gdm-47.0/daemon/gdm-local-display-factory.c:279:29: warning[-Wunused-variable]: unused variable ‘key’ # 279 | const char *key = display_server_configuration[i].key; # | ^~~ # 277| # 278| for (i = 0; display_server_configuration[i].display_server != NULL; i++) { # 279|-> const char *key = display_server_configuration[i].key; # 280| const char *binary = display_server_configuration[i].binary; # 281| gboolean enabled = FALSE; Error: COMPILER_WARNING (CWE-563): [#def11] gdm-47.0-build/gdm-47.0/daemon/gdm-local-display-factory.c: scope_hint: In function ‘display_server_enabled’ gdm-47.0-build/gdm-47.0/daemon/gdm-local-display-factory.c:281:26: warning[-Wunused-variable]: unused variable ‘enabled’ # 281 | gboolean enabled = FALSE; # | ^~~~~~~ # 279| const char *key = display_server_configuration[i].key; # 280| const char *binary = display_server_configuration[i].binary; # 281|-> gboolean enabled = FALSE; # 282| # 283| if (!g_str_equal (display_server_configuration[i].display_server, Error: COMPILER_WARNING (CWE-563): [#def12] gdm-47.0-build/gdm-47.0/daemon/gdm-local-display-factory.c:324:18: warning[-Wunused-but-set-variable]: variable ‘wayland_preferred’ set but not used # 324 | gboolean wayland_preferred = FALSE; # | ^~~~~~~~~~~~~~~~~ # 322| g_autofree gchar *preferred_display_server = NULL; # 323| const char *fallback_display_server = NULL; # 324|-> gboolean wayland_preferred = FALSE; # 325| gboolean xorg_preferred = FALSE; # 326| g_autoptr (GPtrArray) session_types_array = NULL; Error: COMPILER_WARNING (CWE-563): [#def13] gdm-47.0-build/gdm-47.0/daemon/gdm-local-display-factory.c: scope_hint: In function ‘gdm_local_display_factory_get_session_types’ gdm-47.0-build/gdm-47.0/daemon/gdm-local-display-factory.c:325:18: warning[-Wunused-but-set-variable]: variable ‘xorg_preferred’ set but not used # 325 | gboolean xorg_preferred = FALSE; # | ^~~~~~~~~~~~~~ # 323| const char *fallback_display_server = NULL; # 324| gboolean wayland_preferred = FALSE; # 325|-> gboolean xorg_preferred = FALSE; # 326| g_autoptr (GPtrArray) session_types_array = NULL; # 327| char **session_types; Error: COMPILER_WARNING (CWE-1164): [#def14] gdm-47.0-build/gdm-47.0/daemon/gdm-manager.c:1412:1: warning[-Wunused-function]: ‘set_up_chooser_session’ defined but not used # 1412 | set_up_chooser_session (GdmManager *manager, # | ^~~~~~~~~~~~~~~~~~~~~~ # 1410| # 1411| static void # 1412|-> set_up_chooser_session (GdmManager *manager, # 1413| GdmDisplay *display) # 1414| { Error: COMPILER_WARNING: [#def15] gdm-47.0-build/gdm-47.0/daemon/gdm-server.c:617:22: warning[-Warray-bounds=]: array subscript [2, 2147483647] is outside array bounds of ‘gchar *[1]’ # 617 | *argv[len++] = g_strdup (args[i]); # | ~~~~^~~~~~~ gdm-47.0-build/gdm-47.0/daemon/gdm-server.c: scope_hint: In function ‘gdm_server_start’ gdm-47.0-build/gdm-47.0/daemon/gdm-server.c:668:26: note: at offset [16, 17179869176] into object ‘argv’ of size 8 # 668 | gchar **argv = NULL; # | ^~~~ # 615| # 616| for (i=0; i < count;i++) { # 617|-> *argv[len++] = g_strdup (args[i]); # 618| } # 619| Error: COMPILER_WARNING: [#def16] gdm-47.0-build/gdm-47.0/daemon/gdm-server.c:622:19: warning[-Warray-bounds=]: array subscript [2, 2147483647] is outside array bounds of ‘gchar *[1]’ # 622 | argv[len] = NULL; # | ^ gdm-47.0-build/gdm-47.0/daemon/gdm-server.c: scope_hint: In function ‘gdm_server_start’ gdm-47.0-build/gdm-47.0/daemon/gdm-server.c:668:26: note: at offset [16, 17179869176] into object ‘argv’ of size 8 # 668 | gchar **argv = NULL; # | ^~~~ # 620| *argc += count; # 621| # 622|-> argv[len] = NULL; # 623| g_strfreev (args); # 624| } Error: COMPILER_WARNING (CWE-252): [#def17] gdm-47.0-build/gdm-47.0/daemon/gdm-session-linux-auditor.c: scope_hint: In function ‘log_user_message’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-linux-auditor.c:77:17: warning[-Wunused-result]: ignoring return value of ‘audit_log_user_message’ declared with attribute ‘warn_unused_result’ # 77 | audit_log_user_message (linux_auditor->audit_fd, type, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 78 | buf, hostname, NULL, display_device, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 79 | result); # | ~~~~~~~ # 75| if (pw != NULL) { # 76| g_snprintf (buf, sizeof (buf), "uid=%d", pw->pw_uid); # 77|-> audit_log_user_message (linux_auditor->audit_fd, type, # 78| buf, hostname, NULL, display_device, # 79| result); Error: COMPILER_WARNING (CWE-252): [#def18] gdm-47.0-build/gdm-47.0/daemon/gdm-session-linux-auditor.c:82:17: warning[-Wunused-result]: ignoring return value of ‘audit_log_user_message’ declared with attribute ‘warn_unused_result’ # 82 | audit_log_user_message (linux_auditor->audit_fd, type, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 83 | buf, hostname, NULL, display_device, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 84 | result); # | ~~~~~~~ # 80| } else { # 81| g_snprintf (buf, sizeof (buf), "acct=%s", username); # 82|-> audit_log_user_message (linux_auditor->audit_fd, type, # 83| buf, hostname, NULL, display_device, # 84| result); Error: GCC_ANALYZER_WARNING (CWE-476): [#def19] gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c: scope_hint: In function ‘convert_to_utf8’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:720:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:412:9: note: in expansion of macro ‘g_assert’ /usr/include/glib-2.0/glib.h:64: included_from: Included from here. /usr/include/glib-2.0/glib/gmessages.h:370:32: note: in definition of macro ‘g_debug’ /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. gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:717:24: note: in expansion of macro ‘g_strdup’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c: scope_hint: In function ‘convert_to_utf8’ # 718| # 719| p = utf8; # 720|-> while (*p != '\0' && !g_utf8_validate ((const char *)p, -1, (const char **)&q)) { # 721| *q = '?'; # 722| p = q + 1; Error: GCC_ANALYZER_WARNING (CWE-476): [#def20] gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c: scope_hint: In function ‘gdm_session_worker_pam_new_messages_handler.part.0’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:912:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘replies’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:412:9: note: in expansion of macro ‘g_assert’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:653:13: note: in expansion of macro ‘GDM_PAM_EXTENSION_MESSAGE_INVALID_TYPE’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:653:13: note: in expansion of macro ‘GDM_PAM_EXTENSION_MESSAGE_INVALID_TYPE’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:653:13: note: in expansion of macro ‘GDM_PAM_EXTENSION_MESSAGE_INVALID_TYPE’ gdm-47.0-build/gdm-47.0/pam-extensions/gdm-pam-extensions-common.h:70:83: note: in definition of macro ‘GDM_PAM_EXTENSION_MESSAGE_MATCH’ # 910| } # 911| # 912|-> replies[i].resp = response; # 913| replies[i].resp_retcode = PAM_SUCCESS; # 914| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def21] gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:921:39: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘replies’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:412:9: note: in expansion of macro ‘g_assert’ # 919| if (return_value != PAM_SUCCESS || responses == NULL) { # 920| for (i = 0; i < number_of_messages; i++) { # 921|-> if (replies[i].resp != NULL) { # 922| memset (replies[i].resp, 0, strlen (replies[i].resp)); # 923| free (replies[i].resp); Error: COMPILER_WARNING (CWE-252): [#def22] gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c: scope_hint: In function ‘jump_to_vt’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:1075:17: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ # 1075 | write (worker->session_tty_fd, # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1076 | clear_screen_escape_sequence, # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1077 | sizeof (clear_screen_escape_sequence)); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1073| # 1074| /* let's make sure the new VT is clear */ # 1075|-> write (worker->session_tty_fd, # 1076| clear_screen_escape_sequence, # 1077| sizeof (clear_screen_escape_sequence)); Error: GCC_ANALYZER_WARNING (CWE-775): [#def23] gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c: scope_hint: In function ‘gdm_session_worker_start_session’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:1904:27: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘_open_program_session_log(*worker.log_file)’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:46: included_from: Included from here. gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:1962:22: note: in expansion of macro ‘g_open’ # 1902| int i; # 1903| # 1904|-> for (i = n_copies - 1; i > 0; i--) { # 1905| g_autofree char *name_n = NULL; # 1906| g_autofree char *name_n1 = NULL; Error: GCC_ANALYZER_WARNING (CWE-775): [#def24] gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c: scope_hint: In function ‘gdm_session_worker_start_session’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:2091:36: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’ # 2089| needs_controlling_terminal = TRUE; # 2090| } else { # 2091|-> stdin_fd = open ("/dev/null", O_RDWR); # 2092| dup2 (stdin_fd, STDIN_FILENO); # 2093| close (stdin_fd); Error: GCC_ANALYZER_WARNING: [#def25] gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:2092:25: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 2)’ # 2090| } else { # 2091| stdin_fd = open ("/dev/null", O_RDWR); # 2092|-> dup2 (stdin_fd, STDIN_FILENO); # 2093| close (stdin_fd); # 2094| } Error: GCC_ANALYZER_WARNING: [#def26] gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:2101:37: warning[-Wanalyzer-fd-use-without-check]: ‘dup’ on possibly invalid file descriptor ‘_open_program_session_log(*worker.log_file)’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:1962:22: note: in expansion of macro ‘g_open’ # 2099| if (!has_journald && worker->is_program_session) { # 2100| stdout_fd = _open_program_session_log (worker->log_file); # 2101|-> stderr_fd = dup (stdout_fd); # 2102| } # 2103| Error: GCC_ANALYZER_WARNING (CWE-775): [#def27] gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:2176:45: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:2137:17: note: in expansion of macro ‘g_assert’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:1493:16: note: in expansion of macro ‘g_strdup’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c: scope_hint: In function ‘gdm_session_worker_start_session’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:1493:16: note: in expansion of macro ‘g_strdup’ # 2174| } # 2175| } else { # 2176|-> stdout_fd = open ("/dev/null", O_RDWR); # 2177| stderr_fd = dup (stdout_fd); # 2178| } Error: GCC_ANALYZER_WARNING: [#def28] gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:2177:45: warning[-Wanalyzer-fd-use-without-check]: ‘dup’ on possibly invalid file descriptor ‘open("/dev/null", 2)’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:2137:17: note: in expansion of macro ‘g_assert’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:1493:16: note: in expansion of macro ‘g_strdup’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c: scope_hint: In function ‘gdm_session_worker_start_session’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:1493:16: note: in expansion of macro ‘g_strdup’ # 2175| } else { # 2176| stdout_fd = open ("/dev/null", O_RDWR); # 2177|-> stderr_fd = dup (stdout_fd); # 2178| } # 2179| } Error: COMPILER_WARNING (CWE-563): [#def29] gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c: scope_hint: In function ‘set_up_for_current_vt’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:2350:32: warning[-Wunused-variable]: unused variable ‘pam_xauth’ # 2350 | struct pam_xauth_data *pam_xauth; # | ^~~~~~~~~ # 2348| { # 2349| #ifdef PAM_XAUTHDATA # 2350|-> struct pam_xauth_data *pam_xauth; # 2351| #endif # 2352| g_autofree char *pam_tty = NULL; Error: GCC_ANALYZER_WARNING (CWE-476): [#def30] gdm-47.0-build/gdm-47.0/pam-extensions/gdm-pam-extensions.h:24: included_from: Included from here. gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:71: included_from: Included from here. gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c: scope_hint: In function ‘gdm_session_worker_process_extended_pam_message’ gdm-47.0-build/gdm-47.0/pam-extensions/gdm-choice-list-pam-extension.h:66:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘list_response’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:664:17: note: in expansion of macro ‘GDM_PAM_EXTENSION_CHOICE_LIST_RESPONSE_INIT’ /usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here. /usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here. /usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here. /usr/include/glib-2.0/glib.h:32: included_from: Included from here. gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:44: included_from: Included from here. /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:412:9: note: in expansion of macro ‘g_assert’ gdm-47.0-build/gdm-47.0/pam-extensions/gdm-choice-list-pam-extension.h:23: included_from: Included from here. gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:653:13: note: in expansion of macro ‘GDM_PAM_EXTENSION_MESSAGE_INVALID_TYPE’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:653:13: note: in expansion of macro ‘GDM_PAM_EXTENSION_MESSAGE_INVALID_TYPE’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:653:13: note: in expansion of macro ‘GDM_PAM_EXTENSION_MESSAGE_INVALID_TYPE’ gdm-47.0-build/gdm-47.0/pam-extensions/gdm-pam-extensions-common.h:70:83: note: in definition of macro ‘GDM_PAM_EXTENSION_MESSAGE_MATCH’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:664:17: note: in expansion of macro ‘GDM_PAM_EXTENSION_CHOICE_LIST_RESPONSE_INIT’ # 64| GDM_PAM_EXTENSION_LOOK_UP_TYPE (GDM_PAM_EXTENSION_CHOICE_LIST, &response->header.type); \ # 65| response->header.length = htobe32 (GDM_PAM_EXTENSION_CHOICE_LIST_RESPONSE_SIZE); \ # 66|-> response->key = NULL; \ # 67| } # 68| #define GDM_PAM_EXTENSION_REPLY_TO_CHOICE_LIST_RESPONSE(reply) ((GdmPamExtensionChoiceListResponse *) (void *) reply->resp) Error: GCC_ANALYZER_WARNING (CWE-476): [#def31] gdm-47.0-build/gdm-47.0/pam-extensions/gdm-pam-extensions.h:25: included_from: Included from here. gdm-47.0-build/gdm-47.0/pam-extensions/gdm-custom-json-pam-extension.h:56:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(88)’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:681:17: note: in expansion of macro ‘GDM_PAM_EXTENSION_CUSTOM_JSON_RESPONSE_INIT’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gtestutils.h:276:49: note: in expansion of macro ‘G_LIKELY’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:412:9: note: in expansion of macro ‘g_assert’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:653:13: note: in expansion of macro ‘GDM_PAM_EXTENSION_MESSAGE_INVALID_TYPE’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:653:13: note: in expansion of macro ‘GDM_PAM_EXTENSION_MESSAGE_INVALID_TYPE’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:653:13: note: in expansion of macro ‘GDM_PAM_EXTENSION_MESSAGE_INVALID_TYPE’ gdm-47.0-build/gdm-47.0/pam-extensions/gdm-pam-extensions-common.h:70:83: note: in definition of macro ‘GDM_PAM_EXTENSION_MESSAGE_MATCH’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:675:20: note: in expansion of macro ‘GDM_PAM_EXTENSION_MESSAGE_MATCH’ gdm-47.0-build/gdm-47.0/daemon/gdm-session-worker.c:681:17: note: in expansion of macro ‘GDM_PAM_EXTENSION_CUSTOM_JSON_RESPONSE_INIT’ # 54| memcpy ((char *)(response)->protocol_name, (proto_name), proto_len); \ # 55| ((char *)((response)->protocol_name))[proto_len] = '\0'; \ # 56|-> (response)->version = (proto_version); \ # 57| (response)->json = NULL; \ # 58| }
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-169.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | gdm-47.0-2.fc42 |
store-results-to | /tmp/tmpvysw3i_v/gdm-47.0-2.fc42.tar.xz |
time-created | 2024-11-12 23:55:52 |
time-finished | 2024-11-12 23:58:04 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpvysw3i_v/gdm-47.0-2.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpvysw3i_v/gdm-47.0-2.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |