2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

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).
This commit is contained in:
Todd C. Miller
2011-09-23 19:37:21 -04:00
parent 6028afae83
commit 0775147894

View File

@@ -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));