Commit 12623a80 authored by Aaron Colwell's avatar Aaron Colwell Committed by Ronald S. Bultje

vorbisdec: avoid invalid memory access

This fixes some invalid memory access caused later in the function
by res_chan[] not being set for all channels. This happens when a
channel doesn't appear a submap. This change simply returns a
decoder error when this situation is detected.
Signed-off-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
parent ef0d7797
......@@ -1581,6 +1581,9 @@ static int vorbis_parse_audio_packet(vorbis_context *vc)
ch_left -= ch;
}
if (ch_left > 0)
return AVERROR_INVALIDDATA;
// Inverse coupling
for (i = mapping->coupling_steps - 1; i >= 0; --i) { //warning: i has to be signed
......
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