[FFmpeg-cvslog] shorten: dont leave invalid channel counts in the context.

Michael Niedermayer git at videolan.org
Sun Mar 3 03:35:51 CET 2013


ffmpeg | branch: release/1.0 | Michael Niedermayer <michaelni at gmx.at> | Wed Feb 13 01:03:30 2013 +0100| [82213d67bad8785aef8806855fd0d291954193df] | committer: 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: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 4f1279154ee9baf2078241bf5619774970d18b25)

Conflicts:

	libavcodec/shorten.c

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=82213d67bad8785aef8806855fd0d291954193df
---

 libavcodec/shorten.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index d04011e..470b467 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -342,6 +342,7 @@ static int read_header(ShortenContext *s)
     s->channels = get_uint(s, CHANSIZE);
     if (s->channels > MAX_CHANNELS) {
         av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
+        s->channels = 0;
         return -1;
     }
     s->avctx->channels = s->channels;



More information about the ffmpeg-cvslog mailing list