]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sulogin: don't use uninitialized struct sigaction [coverity scan]
authorKarel Zak <kzak@redhat.com>
Thu, 17 Jul 2014 12:47:20 +0000 (14:47 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 17 Jul 2014 12:47:20 +0000 (14:47 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/sulogin.c

index 0eb61d54ef72e0f5fc242708915c87179b211726..d14e527f9ecd85b3fa3f8e6dad934e694dbdb3f5 100644 (file)
@@ -645,6 +645,7 @@ static char *getpasswd(struct console *con)
        tty.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|TOSTOP|ISIG);
        tc = (tcsetattr(fd, TCSAFLUSH, &tty) == 0);
 
+       sigemptyset(&sa.sa_mask);
        sa.sa_handler = alrm_handler;
        sa.sa_flags = 0;
        sigaction(SIGALRM, &sa, NULL);