diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-08-14 16:51:53 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-08-16 14:56:56 +0200 |
commit | 5ef7c84a9374681c64722a96d91741f3b990af2b (patch) | |
tree | ef5c491bdecc4be83773fdb31a2b05ba6c60430c /libavcodec | |
parent | c59967fa7cc5bc2fa06b36c17d2c207240c06b3e (diff) | |
download | ffmpeg-5ef7c84a9374681c64722a96d91741f3b990af2b.tar.gz |
dxa: Make sure the reference frame exists
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dxa.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c index 9e7f453b08..ddc31f3413 100644 --- a/libavcodec/dxa.c +++ b/libavcodec/dxa.c @@ -255,6 +255,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac case 3: case 4: case 5: + if (!tmpptr) { + av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n"); + return AVERROR_INVALIDDATA; + } frame->key_frame = !(compr & 1); frame->pict_type = (compr & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I; for(j = 0; j < avctx->height; j++){ |