From fc56c15da1b816a60df01c74c90db4ca3affb597 Mon Sep 17 00:00:00 2001 From: Doug Hogan Date: Wed, 29 Apr 2015 02:02:47 +0000 Subject: Call CBB_add_space() rather than reimplementing it. ok jsing@ --- lib/libssl/src/ssl/bs_cbb.c | 4 ++-- 1 file 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); -- cgit v1.2.3