diff options
author | 2014-01-31 16:39:19 +0000 | |
---|---|---|
committer | 2014-01-31 16:39:19 +0000 | |
commit | 69881b76d0c289ef55f1413f12e4edc540897517 (patch) | |
tree | a580c269d7cb29b6f8a93163294a60c915fbdb55 /usr.bin/ssh/ssh.c | |
parent | @md5 annotations died at the end of 2008, so it's reasonable to scrape the (diff) | |
download | wireguard-openbsd-69881b76d0c289ef55f1413f12e4edc540897517.tar.xz wireguard-openbsd-69881b76d0c289ef55f1413f12e4edc540897517.zip |
replace most bzero with explicit_bzero, except a few that cna be memset
ok djm dtucker
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r-- | usr.bin/ssh/ssh.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index e0950c2cbcc..94cc3ae0052 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.397 2013/12/29 05:42:16 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.398 2014/01/31 16:39:19 tedu Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -226,7 +226,7 @@ resolve_host(const char *name, u_int port, int logerr, char *cname, size_t clen) int gaierr, loglevel = SYSLOG_LEVEL_DEBUG1; snprintf(strport, sizeof strport, "%u", port); - bzero(&hints, sizeof(hints)); + memset(&hints, 0, sizeof(hints)); hints.ai_family = options.address_family; hints.ai_socktype = SOCK_STREAM; if (cname != NULL) @@ -1649,8 +1649,8 @@ load_public_identity_files(void) #endif /* PKCS11 */ n_ids = 0; - bzero(identity_files, sizeof(identity_files)); - bzero(identity_keys, sizeof(identity_keys)); + memset(identity_files, 0, sizeof(identity_files)); + memset(identity_keys, 0, sizeof(identity_keys)); #ifdef ENABLE_PKCS11 if (options.pkcs11_provider != NULL && @@ -1725,9 +1725,9 @@ load_public_identity_files(void) memcpy(options.identity_files, identity_files, sizeof(identity_files)); memcpy(options.identity_keys, identity_keys, sizeof(identity_keys)); - bzero(pwname, strlen(pwname)); + explicit_bzero(pwname, strlen(pwname)); free(pwname); - bzero(pwdir, strlen(pwdir)); + explicit_bzero(pwdir, strlen(pwdir)); free(pwdir); } |