diff options
author | Damien Miller <djm@mindrot.org> | 2014-02-04 11:18:20 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2014-02-04 11:18:20 +1100 |
commit | 1d2c4564265ee827147af246a16f3777741411ed (patch) | |
tree | af83ab151453d013118cd1bd20fb8ba887665fed /authfile.c | |
parent | 3928de067c286683a95fbdbdb5fdb3c78a0e5efd (diff) |
- tedu@cvs.openbsd.org 2014/01/31 16:39:19
[auth2-chall.c authfd.c authfile.c bufaux.c bufec.c canohost.c]
[channels.c cipher-chachapoly.c clientloop.c configure.ac hostfile.c]
[kexc25519.c krl.c monitor.c sandbox-systrace.c session.c]
[sftp-client.c ssh-keygen.c ssh.c sshconnect2.c sshd.c sshlogin.c]
[openbsd-compat/explicit_bzero.c openbsd-compat/openbsd-compat.h]
replace most bzero with explicit_bzero, except a few that cna be memset
ok djm dtucker
Diffstat (limited to 'authfile.c')
-rw-r--r-- | authfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/authfile.c b/authfile.c index 7eccbb2c9..22da0eb05 100644 --- a/authfile.c +++ b/authfile.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: authfile.c,v 1.101 2013/12/29 04:35:50 djm Exp $ */ | 1 | /* $OpenBSD: authfile.c,v 1.102 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 |
@@ -703,17 +703,17 @@ key_load_file(int fd, const char *filename, Buffer *blob) | |||
703 | __func__, filename == NULL ? "" : filename, | 703 | __func__, filename == NULL ? "" : filename, |
704 | filename == NULL ? "" : " ", strerror(errno)); | 704 | filename == NULL ? "" : " ", strerror(errno)); |
705 | buffer_clear(blob); | 705 | buffer_clear(blob); |
706 | bzero(buf, sizeof(buf)); | 706 | explicit_bzero(buf, sizeof(buf)); |
707 | return 0; | 707 | return 0; |
708 | } | 708 | } |
709 | buffer_append(blob, buf, len); | 709 | buffer_append(blob, buf, len); |
710 | if (buffer_len(blob) > MAX_KEY_FILE_SIZE) { | 710 | if (buffer_len(blob) > MAX_KEY_FILE_SIZE) { |
711 | buffer_clear(blob); | 711 | buffer_clear(blob); |
712 | bzero(buf, sizeof(buf)); | 712 | explicit_bzero(buf, sizeof(buf)); |
713 | goto toobig; | 713 | goto toobig; |
714 | } | 714 | } |
715 | } | 715 | } |
716 | bzero(buf, sizeof(buf)); | 716 | explicit_bzero(buf, sizeof(buf)); |
717 | if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 && | 717 | if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 && |
718 | st.st_size != buffer_len(blob)) { | 718 | st.st_size != buffer_len(blob)) { |
719 | debug("%s: key file %.200s%schanged size while reading", | 719 | debug("%s: key file %.200s%schanged size while reading", |