X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Featgv.c;h=f82f7b9cca8df742be12a8f4c03212db2dc30010;hb=420cedd49745b284c35d97b936b71ff79b43bdf7;hp=93e291f0534eab04dcba73da36f18f6eeaf062d5;hpb=ff44c2d4f483cda53859ce019f3815c69239a7e0;p=ffmpeg diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c index 93e291f0534..f82f7b9cca8 100644 --- a/libavcodec/eatgv.c +++ b/libavcodec/eatgv.c @@ -300,6 +300,9 @@ static int tgv_decode_frame(AVCodecContext *avctx, s->palette[i] = 0xFFU << 24 | AV_RB24(buf); buf += 3; } + if (buf_end - buf < 5) { + return AVERROR_INVALIDDATA; + } } if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)