summaryrefslogtreecommitdiff
path: root/bufaux.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-03-20 00:24:29 +0000
committerColin Watson <cjwatson@debian.org>2014-03-20 00:24:29 +0000
commit796ba4fd011b5d0d9d78d592ba2f30fc9d5ed2e7 (patch)
tree98105bf1621565a2679d5f7f4d650561be2d7666 /bufaux.c
parent9a975a9faed7c4f334e8c8490db3e77e102f2b21 (diff)
parent19158b2447e35838d69b2b735fb640d1e86061ea (diff)
Import openssh_6.6p1.orig.tar.gz
Diffstat (limited to 'bufaux.c')
-rw-r--r--bufaux.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bufaux.c b/bufaux.c
index 9401fe1d0..e24b5fc0a 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bufaux.c,v 1.54 2014/01/12 08:13:13 djm 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
@@ -216,7 +216,7 @@ buffer_get_cstring_ret(Buffer *buffer, u_int *length_ptr)
216 if (cp == ret + length - 1) 216 if (cp == ret + length - 1)
217 error("buffer_get_cstring_ret: string contains \\0"); 217 error("buffer_get_cstring_ret: string contains \\0");
218 else { 218 else {
219 bzero(ret, length); 219 explicit_bzero(ret, length);
220 free(ret); 220 free(ret);
221 return NULL; 221 return NULL;
222 } 222 }
@@ -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