diff options
-rw-r--r-- | src/lib/libcrypto/bytestring/bs_cbb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bytestring/bs_cbb.c b/src/lib/libcrypto/bytestring/bs_cbb.c index 130093117b..c8b6f48245 100644 --- a/src/lib/libcrypto/bytestring/bs_cbb.c +++ b/src/lib/libcrypto/bytestring/bs_cbb.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bs_cbb.c,v 1.3 2022/01/06 14:32:55 jsing Exp $ */ | 1 | /* $OpenBSD: bs_cbb.c,v 1.4 2022/07/07 17:16:05 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -163,6 +163,9 @@ CBB_finish(CBB *cbb, uint8_t **out_data, size_t *out_len) | |||
163 | */ | 163 | */ |
164 | return 0; | 164 | return 0; |
165 | 165 | ||
166 | if (out_data != NULL && *out_data != NULL) | ||
167 | return 0; | ||
168 | |||
166 | if (out_data != NULL) | 169 | if (out_data != NULL) |
167 | *out_data = cbb->base->buf; | 170 | *out_data = cbb->base->buf; |
168 | 171 | ||