[FFmpeg-cvslog] shorten: validate that the channel count in the header is not <= 0

Justin Ruggles git at videolan.org
Sun Sep 22 17:26:23 CEST 2013


ffmpeg | branch: release/0.8 | Justin Ruggles <justin.ruggles at gmail.com> | Tue Oct 23 00:40:51 2012 -0400| [d785f6940144eb6ce4c24309ed034056b81395bc] | committer: Reinhard Tartler

shorten: validate that the channel count in the header is not <= 0

(cherry picked from commit 4c53f4aed3edfa58360c7a2a468782eae31d3176)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>

Conflicts:
	libavcodec/shorten.c

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

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

diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index b8c1908..cb3d09d 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -342,7 +342,7 @@ static int shorten_decode_frame(AVCodecContext *avctx,
         s->internal_ftype = get_uint(s, TYPESIZE);
 
         s->channels = get_uint(s, CHANSIZE);
-        if (s->channels > MAX_CHANNELS) {
+        if (s->channels <= 0 || s->channels > MAX_CHANNELS) {
             av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
             return -1;
         }



More information about the ffmpeg-cvslog mailing list