diff options
author | Damien Miller <djm@mindrot.org> | 2014-02-04 11:20:14 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2014-02-04 11:20:14 +1100 |
commit | a5103f413bde6f31bff85d6e1fd29799c647d765 (patch) | |
tree | 0b35ad9292b2ca8d58229435865d0ec3818e5981 /bufaux.c | |
parent | 1d2c4564265ee827147af246a16f3777741411ed (diff) |
- djm@cvs.openbsd.org 2014/02/02 03:44:32
[auth1.c auth2-chall.c auth2-passwd.c authfile.c bufaux.c bufbn.c]
[buffer.c cipher-3des1.c cipher.c clientloop.c gss-serv.c kex.c]
[kexdhc.c kexdhs.c kexecdhc.c kexgexc.c kexecdhs.c kexgexs.c key.c]
[monitor.c monitor_wrap.c packet.c readpass.c rsa.c serverloop.c]
[ssh-add.c ssh-agent.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c]
[ssh-keygen.c ssh-rsa.c sshconnect.c sshconnect1.c sshconnect2.c]
[sshd.c]
convert memset of potentially-private data to explicit_bzero()
Diffstat (limited to 'bufaux.c')
-rw-r--r-- | bufaux.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bufaux.c,v 1.55 2014/01/31 16:39:19 tedu Exp $ */ | 1 | /* $OpenBSD: bufaux.c,v 1.56 2014/02/02 03:44:31 djm 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 |
@@ -346,7 +346,7 @@ buffer_get_bignum2_as_string_ret(Buffer *buffer, u_int *length_ptr) | |||
346 | } | 346 | } |
347 | ret = xmalloc(len); | 347 | ret = xmalloc(len); |
348 | memcpy(ret, p, len); | 348 | memcpy(ret, p, len); |
349 | memset(p, '\0', len); | 349 | explicit_bzero(p, len); |
350 | free(bin); | 350 | free(bin); |
351 | return ret; | 351 | return ret; |
352 | } | 352 | } |
@@ -383,7 +383,7 @@ buffer_put_bignum2_from_string(Buffer *buffer, const u_char *s, u_int l) | |||
383 | } | 383 | } |
384 | memcpy(p, s, l); | 384 | memcpy(p, s, l); |
385 | buffer_put_string(buffer, buf, l + pad); | 385 | buffer_put_string(buffer, buf, l + pad); |
386 | memset(buf, '\0', l + pad); | 386 | explicit_bzero(buf, l + pad); |
387 | free(buf); | 387 | free(buf); |
388 | } | 388 | } |
389 | 389 | ||