From: tb Date: Thu, 7 Jul 2022 17:16:05 +0000 (+0000) Subject: Sync bs_cbb.c with libssl. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=45b28f4836027cd6f9135491652049df386893e0;p=openbsd Sync bs_cbb.c with libssl. ok jsing --- 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;