use memset_s

lib roken includes support for memset_s() but it was not applied
to the Heimdal source tree.

Change-Id: I8362ec97a9be50205bb2d398e65b629b88ce1acd
This commit is contained in:
Jeffrey Altman
2017-04-28 11:11:07 -04:00
parent 85acd57c8a
commit 93518bfab4
21 changed files with 80 additions and 76 deletions

View File

@@ -76,7 +76,7 @@ set_random_password (krb5_principal principal, int keepold)
printf ("%s's password set to \"%s\"\n", princ_name, pw);
free (princ_name);
}
memset (pw, 0, sizeof(pw));
memset_s(pw, sizeof(pw), 0, sizeof(pw));
return ret;
}
@@ -108,7 +108,7 @@ set_password (krb5_principal principal, char *password, int keepold)
if(ret == 0)
ret = kadm5_chpass_principal_3(kadm_handle, principal, keepold, 0, NULL,
password);
memset(pwbuf, 0, sizeof(pwbuf));
memset_s(pwbuf, sizeof(pwbuf), 0, sizeof(pwbuf));
return ret;
}