summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hogan <doug@cvs.openbsd.org>2015-04-29 02:02:47 +0000
committerDoug Hogan <doug@cvs.openbsd.org>2015-04-29 02:02:47 +0000
commitfc56c15da1b816a60df01c74c90db4ca3affb597 (patch)
tree6b4e6e92627f3c56a87eb6b28c884af7c874f986
parent44af89df961335af730234197017850c8dafe36c (diff)
Call CBB_add_space() rather than reimplementing it.
ok jsing@
-rw-r--r--lib/libssl/src/ssl/bs_cbb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/src/ssl/bs_cbb.c b/lib/libssl/src/ssl/bs_cbb.c
index 07315e86bbc..b766e850d33 100644
--- a/lib/libssl/src/ssl/bs_cbb.c
+++ b/lib/libssl/src/ssl/bs_cbb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bs_cbb.c,v 1.7 2015/04/29 01:49:28 doug Exp $ */
+/* $OpenBSD: bs_cbb.c,v 1.8 2015/04/29 02:02:46 doug Exp $ */
/*
* Copyright (c) 2014, Google Inc.
*
@@ -324,7 +324,7 @@ CBB_add_bytes(CBB *cbb, const uint8_t *data, size_t len)
{
uint8_t *dest;
- if (!CBB_flush(cbb) || !cbb_buffer_add(cbb->base, &dest, len))
+ if (!CBB_add_space(cbb, &dest, len))
return 0;
memcpy(dest, data, len);