Commit 811a504c authored by Michael Niedermayer's avatar Michael Niedermayer

shorten: dont leave invalid channel counts in the context.

Fixes freeing invalid addresses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <>
(cherry picked from commit 4f127915)
Signed-off-by: 's avatarMichael Niedermayer <>
parent 75211f2b
......@@ -343,6 +343,7 @@ static int read_header(ShortenContext *s)
s->channels = get_uint(s, CHANSIZE);
if (s->channels <= 0 || s->channels > MAX_CHANNELS) {
av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
s->channels = 0;
s->avctx->channels = s->channels;
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