[FFmpeg-cvslog] cavsdec: check dimensions being valid.
Michael Niedermayer
git at videolan.org
Sat Aug 11 02:05:53 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Aug 11 02:00:33 2012 +0200| [f9505923a344a56c3ff36925adb7f0c3c9a3996c] | committer: Michael Niedermayer
cavsdec: check dimensions being valid.
Fixes crash
Fixes Ticket1628
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f9505923a344a56c3ff36925adb7f0c3c9a3996c
---
libavcodec/cavsdec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 2131cd4..099599a 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -625,6 +625,10 @@ static int decode_seq_header(AVSContext *h) {
av_log_missing_feature(s, "Width/height changing in CAVS is", 0);
return -1;
}
+ if (width <= 0 || height <= 0) {
+ av_log(s, AV_LOG_ERROR, "Dimensions invalid\n");
+ return AVERROR_INVALIDDATA;
+ }
s->width = width;
s->height = height;
skip_bits(&s->gb,2); //chroma format
More information about the ffmpeg-cvslog
mailing list