mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/fic: Check if a frame is available before using it
Fixes null pointer dereference Fixes: ficvf.avi Found-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
fccd85b9f3
commit
1b5ec6a0c3
@ -282,8 +282,13 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
|
||||
av_log(avctx, AV_LOG_WARNING, "Invalid FIC Header.\n");
|
||||
|
||||
/* Is it a skip frame? */
|
||||
if (src[17])
|
||||
if (src[17]) {
|
||||
if (!ctx->final_frame) {
|
||||
av_log(avctx, AV_LOG_WARNING, "Initial frame is skipped\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
goto skip;
|
||||
}
|
||||
|
||||
nslices = src[13];
|
||||
if (!nslices) {
|
||||
|
Loading…
Reference in New Issue
Block a user