diff options
author | 2015-08-27 13:33:24 +0000 | |
---|---|---|
committer | 2015-08-27 13:33:24 +0000 | |
commit | c41446b56e99f67683f41be044a8194b457f5a79 (patch) | |
tree | 97e25f1ebc3290881c32dc5358b46a002cb43e14 | |
parent | backout previous for now, as it causes me portability problems (diff) | |
download | wireguard-openbsd-c41446b56e99f67683f41be044a8194b457f5a79.tar.xz wireguard-openbsd-c41446b56e99f67683f41be044a8194b457f5a79.zip |
use explicit_bzero to clear some memory that had creds in it instead of
memset.
ok deraadt@ millert@
-rw-r--r-- | lib/libc/gen/authenticate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/authenticate.c b/lib/libc/gen/authenticate.c index 0c2d95369d8..37c178540a2 100644 --- a/lib/libc/gen/authenticate.c +++ b/lib/libc/gen/authenticate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authenticate.c,v 1.20 2013/11/24 23:51:29 deraadt Exp $ */ +/* $OpenBSD: authenticate.c,v 1.21 2015/08/27 13:33:24 dlg Exp $ */ /*- * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. @@ -348,7 +348,7 @@ auth_usercheck(char *name, char *style, char *type, char *password) auth_setitem(as, AUTHV_SERVICE, "response"); auth_setdata(as, "", 1); auth_setdata(as, password, strlen(password) + 1); - memset(password, 0, strlen(password)); + explicit_bzero(password, strlen(password)); } else as = NULL; as = auth_verify(as, style, name, lc->lc_class, (char *)NULL); @@ -453,7 +453,7 @@ auth_userresponse(auth_session_t *as, char *response, int more) auth_setdata(as, "", 1); if (response) { auth_setdata(as, response, strlen(response) + 1); - memset(response, 0, strlen(response)); + explicit_bzero(response, strlen(response)); } else auth_setdata(as, "", 1); |