diff options
author | Tristan Matthews <tmatth@videolan.org> | 2019-03-13 19:25:44 +0300 |
---|---|---|
committer | Tristan Matthews <tmatth@videolan.org> | 2019-03-13 19:26:18 +0300 |
commit | 7e733a9f65014a062be31150bdf55041808838c4 (patch) | |
tree | 943b4122db8f7d3bdea1656a410f9d83fb77ff79 | |
parent | ce150863b1c4bb14b6a793a30c5e68dcb6d2decd (diff) |
oss-fuzz: constrain extra_headers
-rw-r--r-- | contrib/oss-fuzz/speexdec_fuzzer.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/oss-fuzz/speexdec_fuzzer.cc b/contrib/oss-fuzz/speexdec_fuzzer.cc index 030c9c3..f90153a 100644 --- a/contrib/oss-fuzz/speexdec_fuzzer.cc +++ b/contrib/oss-fuzz/speexdec_fuzzer.cc @@ -138,6 +138,11 @@ static void *process_header(ogg_packet *op, spx_int32_t enh_enabled, spx_int32_t speex_decoder_ctl(st, SPEEX_SET_HANDLER, &callback); } + if (header->extra_headers > INT_MAX - 1) + { + free(header); + return NULL; + } *extra_headers = header->extra_headers; free(header); |