summaryrefslogtreecommitdiff
path: root/src/lib/libssl/bs_cbb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/bs_cbb.c')
-rw-r--r--src/lib/libssl/bs_cbb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/bs_cbb.c b/src/lib/libssl/bs_cbb.c
index beb588fe25..a34e822c94 100644
--- a/src/lib/libssl/bs_cbb.c
+++ b/src/lib/libssl/bs_cbb.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bs_cbb.c,v 1.19 2018/08/16 18:39:37 jsing Exp $ */ 1/* $OpenBSD: bs_cbb.c,v 1.20 2019/01/23 22:20:40 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2014, Google Inc. 3 * Copyright (c) 2014, Google Inc.
4 * 4 *
@@ -14,7 +14,6 @@
14 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 14 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
15 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ 15 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
16 16
17#include <assert.h>
18#include <stdlib.h> 17#include <stdlib.h>
19#include <string.h> 18#include <string.h>
20 19
@@ -214,7 +213,8 @@ CBB_flush(CBB *cbb)
214 uint8_t initial_length_byte; 213 uint8_t initial_length_byte;
215 214
216 /* We already wrote 1 byte for the length. */ 215 /* We already wrote 1 byte for the length. */
217 assert (cbb->pending_len_len == 1); 216 if (cbb->pending_len_len != 1)
217 return 0;
218 218
219 /* Check for long form */ 219 /* Check for long form */
220 if (len > 0xfffffffe) 220 if (len > 0xfffffffe)