Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiph/speex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyson Smith <twsmith@mozilla.com>2019-08-08 23:26:58 +0300
committerTristan Matthews <tmatth@videolan.org>2019-08-08 23:28:12 +0300
commit58ac1d4ff1cfad77426d98af5c9b143395f25acd (patch)
tree011b42c1038f5e648ad37067ec621eba1c084fa4
parent1147712264d05b85cf7b1cd173146ac75df88bf6 (diff)
speexdec_fuzzer: impose upper limit of 4096 on input size
Signed-off-by: Tristan Matthews <tmatth@videolan.org>
-rw-r--r--contrib/oss-fuzz/speexdec_fuzzer.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/oss-fuzz/speexdec_fuzzer.cc b/contrib/oss-fuzz/speexdec_fuzzer.cc
index 7175fa3..e68201d 100644
--- a/contrib/oss-fuzz/speexdec_fuzzer.cc
+++ b/contrib/oss-fuzz/speexdec_fuzzer.cc
@@ -191,6 +191,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *fuzz_data, size_t fuzz_size
enh_enabled = 1;
+ /*Check fuzz_data meets size requirements*/
+ if (fuzz_size > 4096)
+ return 0;
+
/*Init Ogg data struct*/
ogg_sync_init(&oy);