diff options
author | Janne Grunau <janne-libav@jannau.net> | 2012-11-28 22:17:14 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2013-01-12 19:36:38 +0100 |
commit | ad025377462cd01c11f1fe67d087804999af9d49 (patch) | |
tree | 52d986faf3502919174f5e9db07c782d339ff4f3 /libavcodec/h264.c | |
parent | 3bc9cfe66e1a34c6d9dc45fde2a44aa38e6363ce (diff) | |
download | ffmpeg-ad025377462cd01c11f1fe67d087804999af9d49.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>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 98c68d873f..1f85eea24d 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3832,6 +3832,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 && (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc) && (avctx->skip_frame < AVDISCARD_BIDIR || hx->slice_type_nos!=AV_PICTURE_TYPE_B) |