diff options
author | Tristan Matthews <tmatth@videolan.org> | 2019-03-04 08:56:51 +0300 |
---|---|---|
committer | Tristan Matthews <tmatth@videolan.org> | 2019-03-04 08:56:51 +0300 |
commit | b27ab288bb47531ff6a78fec3bfff5cc7fe56b36 (patch) | |
tree | a8313aa7563245b9edcc65c9044a5da3ece6d4b1 | |
parent | a51c008a832c00532c62ec6c951b8ecb1d99f728 (diff) |
oss-fuzz: avoid int overflow on multiply
-rw-r--r-- | contrib/oss-fuzz/speexdec_fuzzer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/oss-fuzz/speexdec_fuzzer.cc b/contrib/oss-fuzz/speexdec_fuzzer.cc index e520405..60e3d6b 100644 --- a/contrib/oss-fuzz/speexdec_fuzzer.cc +++ b/contrib/oss-fuzz/speexdec_fuzzer.cc @@ -208,7 +208,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *fuzz_data, size_t fuzz_size if (page_granule>0 && frame_size) { /* FIXME: shift the granule values if --force-* is specified */ - skip_samples = frame_size*(page_nb_packets*granule_frame_size*nframes - (page_granule-last_granule))/granule_frame_size; + skip_samples = frame_size*(int64_t)(page_nb_packets*granule_frame_size*nframes - (page_granule-last_granule))/granule_frame_size; if (ogg_page_eos(&og)) skip_samples = -skip_samples; /*else if (!ogg_page_bos(&og)) |