e_auth - null out compilert memset opts like lokker

This commit is contained in:
Carsten Haitzler 2014-11-03 16:52:47 +09:00
parent 103a980adb
commit 3405362b1d
1 changed files with 3 additions and 0 deletions

View File

@ -174,6 +174,9 @@ e_auth_begin(char *passwd)
pam_end(da.pam.handle, pamerr);
/* security - null out passwd string once we are done with it */
memset(da.passwd, 0, sizeof(da.passwd));
/* break compiler optimization */
if (da.passwd[0] || da.passwd[3])
fprintf(stderr, "ACK!\n");
if (pamerr == PAM_SUCCESS)
{
free(current_user);