Commit f9505923 authored by Michael Niedermayer's avatar Michael Niedermayer

cavsdec: check dimensions being valid.

Fixes crash
Fixes Ticket1628
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bd6ece46
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment