diff options
author | jsing <> | 2017-04-14 15:20:55 +0000 |
---|---|---|
committer | jsing <> | 2017-04-14 15:20:55 +0000 |
commit | c4c40cc784e8413d3bf312ccea42c341e10112a7 (patch) | |
tree | 25732663abb029422cbd313c635d7870ebabb651 /src/lib | |
parent | 29d4d9a9437a75e4d78b07f6dc0a77b67e65db7e (diff) | |
download | openbsd-c4c40cc784e8413d3bf312ccea42c341e10112a7.tar.gz openbsd-c4c40cc784e8413d3bf312ccea42c341e10112a7.tar.bz2 openbsd-c4c40cc784e8413d3bf312ccea42c341e10112a7.zip |
Use freezero(3) in the CBB clean up path, since this could hold sensitive
information (such as master keys).
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/bs_cbb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libssl/bs_cbb.c b/src/lib/libssl/bs_cbb.c index a84299f8a2..154a7964e6 100644 --- a/src/lib/libssl/bs_cbb.c +++ b/src/lib/libssl/bs_cbb.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bs_cbb.c,v 1.14 2017/03/10 15:16:20 jsing Exp $ */ | 1 | /* $OpenBSD: bs_cbb.c,v 1.15 2017/04/14 15:20:55 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -80,8 +80,7 @@ CBB_cleanup(CBB *cbb) | |||
80 | { | 80 | { |
81 | if (cbb->base) { | 81 | if (cbb->base) { |
82 | if (cbb->base->can_resize) | 82 | if (cbb->base->can_resize) |
83 | free(cbb->base->buf); | 83 | freezero(cbb->base->buf, cbb->base->cap); |
84 | |||
85 | free(cbb->base); | 84 | free(cbb->base); |
86 | } | 85 | } |
87 | cbb->base = NULL; | 86 | cbb->base = NULL; |