diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2020-03-13 15:54:35 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2020-03-13 15:54:35 +0000 |
commit | c5c22840a2275742e5ed7795e100b764d4c35303 (patch) | |
tree | 3e0c08bcdb744086e5d5bdce839b35f777012fd4 /lib | |
parent | 6d0eb202b3e697f6451cceaed830051022fda766 (diff) |
Ensure that CBB_add_space() always provides zeroed memory.
ok tb@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/bs_cbb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libssl/bs_cbb.c b/lib/libssl/bs_cbb.c index 16e17fb70f1..d11da853cd0 100644 --- a/lib/libssl/bs_cbb.c +++ b/lib/libssl/bs_cbb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bs_cbb.c,v 1.21 2020/03/12 17:17:12 jsing Exp $ */ +/* $OpenBSD: bs_cbb.c,v 1.22 2020/03/13 15:54:34 jsing Exp $ */ /* * Copyright (c) 2014, Google Inc. * @@ -374,6 +374,7 @@ CBB_add_space(CBB *cbb, uint8_t **out_data, size_t len) if (!CBB_flush(cbb) || !cbb_buffer_add(cbb->base, out_data, len)) return 0; + memset(*out_data, 0, len); return 1; } |