Commit 564ae836 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/gifdec: print error if image is not within dimensions

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8b2578ab
......@@ -181,8 +181,10 @@ static int gif_read_image(GifState *s, AVFrame *frame)
/* verify that all the image is inside the screen dimensions */
if (left + width > s->screen_width ||
top + height > s->screen_height)
top + height > s->screen_height) {
av_log(s->avctx, AV_LOG_ERROR, "image is outside the screen dimensions.\n");
return AVERROR_INVALIDDATA;
}
if (width <= 0 || height <= 0) {
av_log(s->avctx, AV_LOG_ERROR, "Invalid image dimensions.\n");
return AVERROR_INVALIDDATA;
......
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