mirror of https://git.ffmpeg.org/ffmpeg.git
v410dec: Check for sufficient input data.
Fixes crash
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 11ca3416f9
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b0355d3253
commit
a47c277205
|
@ -55,6 +55,11 @@ static int v410_decode_frame(AVCodecContext *avctx, void *data,
|
|||
if (pic->data[0])
|
||||
avctx->release_buffer(avctx, pic);
|
||||
|
||||
if (avpkt->size < 4*avctx->height*avctx->width) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Insufficient input data.\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
pic->reference = 0;
|
||||
|
||||
if (avctx->get_buffer(avctx, pic) < 0) {
|
||||
|
|
Loading…
Reference in New Issue