From 45b28f4836027cd6f9135491652049df386893e0 Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 7 Jul 2022 17:16:05 +0000 Subject: [PATCH] Sync bs_cbb.c with libssl. ok jsing --- lib/libcrypto/bytestring/bs_cbb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libcrypto/bytestring/bs_cbb.c b/lib/libcrypto/bytestring/bs_cbb.c index 130093117b5..c8b6f482456 100644 --- a/lib/libcrypto/bytestring/bs_cbb.c +++ b/lib/libcrypto/bytestring/bs_cbb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bs_cbb.c,v 1.3 2022/01/06 14:32:55 jsing Exp $ */ +/* $OpenBSD: bs_cbb.c,v 1.4 2022/07/07 17:16:05 tb Exp $ */ /* * Copyright (c) 2014, Google Inc. * @@ -163,6 +163,9 @@ CBB_finish(CBB *cbb, uint8_t **out_data, size_t *out_len) */ return 0; + if (out_data != NULL && *out_data != NULL) + return 0; + if (out_data != NULL) *out_data = cbb->base->buf; -- 2.20.1