summaryrefslogtreecommitdiff
path: root/lib/libssl/bs_cbb.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libssl/bs_cbb.c')
-rw-r--r--lib/libssl/bs_cbb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/bs_cbb.c b/lib/libssl/bs_cbb.c
index 3f8e08e0e35..a84299f8a20 100644
--- a/lib/libssl/bs_cbb.c
+++ b/lib/libssl/bs_cbb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bs_cbb.c,v 1.13 2015/09/01 13:35:39 jsing Exp $ */
+/* $OpenBSD: bs_cbb.c,v 1.14 2017/03/10 15:16:20 jsing Exp $ */
/*
* Copyright (c) 2014, Google Inc.
*
@@ -110,7 +110,7 @@ cbb_buffer_add(struct cbb_buffer_st *base, uint8_t **out, size_t len)
if (newcap < base->cap || newcap < newlen)
newcap = newlen;
- newbuf = realloc(base->buf, newcap);
+ newbuf = recallocarray(base->buf, base->cap, newcap, 1);
if (newbuf == NULL)
return 0;