[FFmpeg-cvslog] shorten: validate that the channel count in the header is not <= 0
Justin Ruggles
git at videolan.org
Fri Nov 2 14:32:42 CET 2012
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Tue Oct 23 00:40:51 2012 -0400| [4c53f4aed3edfa58360c7a2a468782eae31d3176] | committer: Justin Ruggles
shorten: validate that the channel count in the header is not <= 0
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c53f4aed3edfa58360c7a2a468782eae31d3176
---
libavcodec/shorten.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 1664a90..be2b8e2 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -342,7 +342,7 @@ static int read_header(ShortenContext *s)
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