From 0775147894185196b3773aceea574de96a1c2459 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 23 Sep 2011 19:37:21 -0400 Subject: [PATCH] Quiet a false positive found by several static analysis tools. These tools don't know that log_error() does not return (it longjmps to error_jmp which returns to the sudo front-end). --- plugins/sudoers/sudoers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index a3816e2cb..4adabaac6 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -797,7 +797,7 @@ init_vars(char * const envp[]) * can read the shadow passwd file if necessary. */ if ((sudo_user.pw = sudo_getpwnam(user_name)) == NULL) { - struct passwd pw; + static struct passwd pw; /* Create a fake struct passwd for log_error(). */ memset(&pw, 0, sizeof(pw)); -- 2.40.0