aboutsummaryrefslogtreecommitdiff
path: root/fuzz/fuzz_assert.c
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2023-04-26 16:40:46 +0000
committerEd Maste <emaste@FreeBSD.org>2023-04-26 16:40:46 +0000
commit00db45a65823dc224f3630bc8185e789064fef6a (patch)
tree67a107b082e8087b8c2d31867642ec8267165c29 /fuzz/fuzz_assert.c
parentfdfa06d7d381e83be6a8c5e39a5bd7af714ac656 (diff)
Diffstat (limited to 'fuzz/fuzz_assert.c')
-rw-r--r--fuzz/fuzz_assert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fuzz/fuzz_assert.c b/fuzz/fuzz_assert.c
index 603957ec2bac..9f39f3d6ecb7 100644
--- a/fuzz/fuzz_assert.c
+++ b/fuzz/fuzz_assert.c
@@ -141,7 +141,7 @@ pack(uint8_t *ptr, size_t len, const struct param *p)
goto fail;
if ((cbor_len = cbor_serialize_alloc(array, &cbor,
- &cbor_alloc_len)) > len) {
+ &cbor_alloc_len)) == 0 || cbor_len > len) {
cbor_len = 0;
goto fail;
}