aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2012-11-28 22:17:14 +0100
committerReinhard Tartler <siretart@tauware.de>2013-02-10 18:01:15 +0100
commita49599b1255ec0300cdec1591edf506433407804 (patch)
tree55eb4450ec6a402df33aa559bed41bf7e9332f44
parentfe4409a396d7f577fbcac6c2ff0df3c6eabc3727 (diff)
downloadffmpeg-a49599b1255ec0300cdec1591edf506433407804.tar.gz
h264: check context state before decoding slice data partitions
Fixes mov_h264_aac__Demo_FlagOfOurFathers.mov.SIGSEGV.4e9.656. Found-by: Mateusz "j00ru" Jurczyk CC: libav-stable@libav.org (cherry-picked from commit c1fcf563b13051f280db169ba41c6a1b21b25e08) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r--libavcodec/h264.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index b7eacc5cb1..a4d26f0977 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -7554,6 +7554,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
hx->inter_gb_ptr= &hx->inter_gb;
if(hx->redundant_pic_count==0 && hx->intra_gb_ptr && hx->s.data_partitioning
+ && s->current_picture_ptr
&& s->context_initialized
&& s->hurry_up < 5
&& (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc)