Commit 2c16bf2d authored by Michael Niedermayer's avatar Michael Niedermayer

vorbisdec: Check bark_map_size.

This fixes potential divisions by zero and out of array accesses.
Reported-by: 's avatarDale Curtis <dalecurtis@chromium.org>
Found-by: inferno@chromium.org
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7e5c5fa5
......@@ -597,6 +597,10 @@ static int vorbis_parse_setup_hdr_floors(vorbis_context *vc)
"Floor 0 amplitude bits is 0.\n");
return AVERROR_INVALIDDATA;
}
if (floor_setup->data.t0.bark_map_size == 0) {
av_log(vc->avccontext, AV_LOG_ERROR, "Floor 0 bark map size is 0.\n");
return AVERROR_INVALIDDATA;
}
floor_setup->data.t0.amplitude_offset = get_bits(gb, 8);
floor_setup->data.t0.num_books = get_bits(gb, 4) + 1;
......
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