aboutsummaryrefslogtreecommitdiff
path: root/c/fuzz/decode_fuzzer.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/fuzz/decode_fuzzer.c')
-rw-r--r--c/fuzz/decode_fuzzer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/c/fuzz/decode_fuzzer.c b/c/fuzz/decode_fuzzer.c
index 46144e0..697f9bf 100644
--- a/c/fuzz/decode_fuzzer.c
+++ b/c/fuzz/decode_fuzzer.c
@@ -27,6 +27,11 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
size_t total_out = 0;
BrotliDecoderState* state = BrotliDecoderCreateInstance(0, 0, 0);
+ if (!state) {
+ // OOM is out-of-scope here.
+ free(buffer);
+ return 0;
+ }
if (addend == 0)
addend = size;