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

Sprinkle some volatile qualifiers to prevent over-enthusiastic

optimizers from removing memset() calls.
This commit is contained in:
Todd C. Miller
2002-11-22 19:41:13 +00:00
parent fd140ff5da
commit abb4e1ad35
5 changed files with 12 additions and 10 deletions

View File

@@ -70,13 +70,14 @@ aixauth_verify(pw, prompt, auth)
char *prompt;
sudo_auth *auth;
{
char *message, *pass;
volatile char *pass;
char *message;
int reenter = 1;
int rval = AUTH_FAILURE;
pass = tgetpass(prompt, def_ival(I_PASSWD_TIMEOUT) * 60, tgetpass_flags);
if (pass) {
if (authenticate(pw->pw_name, pass, &reenter, &message) == 0)
if (authenticate(pw->pw_name, (char *)pass, &reenter, &message) == 0)
rval = AUTH_SUCCESS;
memset(pass, 0, strlen(pass));
}