Implement memset_s() and use it instead of zero_bytes().
A new constant, SUDO_CONV_REPL_MAX, is defined by the plugin API as the max conversation reply length. This constant can be used as a max value for memset_s() when clearing passwords filled in by the conversation function.
This commit is contained in:
@@ -254,7 +254,7 @@ verify_user(struct passwd *pw, char *prompt, int validated)
|
||||
goto done;
|
||||
}
|
||||
if (!standalone)
|
||||
zero_bytes(p, strlen(p));
|
||||
memset_s(p, SUDO_CONV_REPL_MAX, 0, strlen(p));
|
||||
pass_warn();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user