From 18f8c184323d9ffd01f371dcabb10a1b8a3c59e3 Mon Sep 17 00:00:00 2001 From: doug Date: Wed, 29 Apr 2015 02:02:46 +0000 Subject: [PATCH] Call CBB_add_space() rather than reimplementing it. ok jsing@ --- lib/libssl/bs_cbb.c | 4 ++-- lib/libssl/src/ssl/bs_cbb.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libssl/bs_cbb.c b/lib/libssl/bs_cbb.c index 07315e86bbc..b766e850d33 100644 --- a/lib/libssl/bs_cbb.c +++ b/lib/libssl/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); 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); -- 2.20.1