summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ssh.c b/ssh.c
index 5de8fcf43..ec957333b 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.397 2013/12/29 05:42:16 djm Exp $ */ 1/* $OpenBSD: ssh.c,v 1.398 2014/01/31 16:39:19 tedu Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -239,7 +239,7 @@ resolve_host(const char *name, u_int port, int logerr, char *cname, size_t clen)
239 int gaierr, loglevel = SYSLOG_LEVEL_DEBUG1; 239 int gaierr, loglevel = SYSLOG_LEVEL_DEBUG1;
240 240
241 snprintf(strport, sizeof strport, "%u", port); 241 snprintf(strport, sizeof strport, "%u", port);
242 bzero(&hints, sizeof(hints)); 242 memset(&hints, 0, sizeof(hints));
243 hints.ai_family = options.address_family; 243 hints.ai_family = options.address_family;
244 hints.ai_socktype = SOCK_STREAM; 244 hints.ai_socktype = SOCK_STREAM;
245 if (cname != NULL) 245 if (cname != NULL)
@@ -1697,8 +1697,8 @@ load_public_identity_files(void)
1697#endif /* PKCS11 */ 1697#endif /* PKCS11 */
1698 1698
1699 n_ids = 0; 1699 n_ids = 0;
1700 bzero(identity_files, sizeof(identity_files)); 1700 memset(identity_files, 0, sizeof(identity_files));
1701 bzero(identity_keys, sizeof(identity_keys)); 1701 memset(identity_keys, 0, sizeof(identity_keys));
1702 1702
1703#ifdef ENABLE_PKCS11 1703#ifdef ENABLE_PKCS11
1704 if (options.pkcs11_provider != NULL && 1704 if (options.pkcs11_provider != NULL &&
@@ -1773,9 +1773,9 @@ load_public_identity_files(void)
1773 memcpy(options.identity_files, identity_files, sizeof(identity_files)); 1773 memcpy(options.identity_files, identity_files, sizeof(identity_files));
1774 memcpy(options.identity_keys, identity_keys, sizeof(identity_keys)); 1774 memcpy(options.identity_keys, identity_keys, sizeof(identity_keys));
1775 1775
1776 bzero(pwname, strlen(pwname)); 1776 explicit_bzero(pwname, strlen(pwname));
1777 free(pwname); 1777 free(pwname);
1778 bzero(pwdir, strlen(pwdir)); 1778 explicit_bzero(pwdir, strlen(pwdir));
1779 free(pwdir); 1779 free(pwdir);
1780} 1780}
1781 1781