Commit 8d6eea3d authored by Tristan Matthews's avatar Tristan Matthews

speexdec_fuzzer: avoid integer overflow

Fixes ubsan error in fuzzer:
   "runtime error: signed integer overflow: 2147483616 + 160 cannot be represented in type 'int'

Found-by: continuous fuzzing process
parent d5f30cba
......@@ -311,6 +311,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *fuzz_data, size_t fuzz_size
if (channels==2)
speex_decode_stereo_func(output, frame_size, &stereo);
if (INT_MAX - lookahead > skip_samples)
int new_frame_size = frame_size;
if (packet_no == 1 && j==0 && skip_samples > 0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment