diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-11 16:36:27 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-11 16:43:53 +0100 |
commit | 0a4087b8930d283aeec0aaf15d9991b6b1765597 (patch) | |
tree | bd318c99ed926a51ee2c798f78c745ec50220076 /libavcodec/diracdec.c | |
parent | c0aff4064d3990d467d976530ef45b51062fb366 (diff) | |
download | ffmpeg-streaming-0a4087b8930d283aeec0aaf15d9991b6b1765597.zip ffmpeg-streaming-0a4087b8930d283aeec0aaf15d9991b6b1765597.tar.gz |
diracdec: Use only one frame per reference
Prevents null ptr dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/diracdec.c')
-rw-r--r-- | libavcodec/diracdec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 3d42a9d..c70a0c7 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -1665,6 +1665,7 @@ static int dirac_decode_picture_header(DiracContext *s) if (!s->all_frames[j].avframe.data[0]) { s->ref_pics[i] = &s->all_frames[j]; s->avctx->get_buffer(s->avctx, &s->ref_pics[i]->avframe); + break; } } |