1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-12 07:30:54 +02:00

cavsdec: check dimensions being valid.

Fixes crash
Fixes Ticket1628

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-08-11 02:00:33 +02:00
parent bd6ece4609
commit f9505923a3

View File

@ -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