diff options
Diffstat (limited to 'contrib/libfido2/fuzz/fuzz_largeblob.c')
| -rw-r--r-- | contrib/libfido2/fuzz/fuzz_largeblob.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/libfido2/fuzz/fuzz_largeblob.c b/contrib/libfido2/fuzz/fuzz_largeblob.c index 3289ed46e2a7..6cdc0c0d57cb 100644 --- a/contrib/libfido2/fuzz/fuzz_largeblob.c +++ b/contrib/libfido2/fuzz/fuzz_largeblob.c @@ -2,6 +2,7 @@ * Copyright (c) 2020 Yubico AB. All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file. + * SPDX-License-Identifier: BSD-2-Clause */ #include <assert.h> @@ -118,7 +119,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; } @@ -141,7 +142,7 @@ size_t pack_dummy(uint8_t *ptr, size_t len) { struct param dummy; - uint8_t blob[4096]; + uint8_t blob[MAXCORPUS]; size_t blob_len; memset(&dummy, 0, sizeof(dummy)); |
