diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-10 01:13:07 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-10 01:48:23 +0300 |
commit | 09096fb68713089a8f97c8fa24e9d7f3bb9231d5 (patch) | |
tree | 0f69522bb118bea51806a950b36e3551778df981 /libavcodec/h264_parser.c | |
parent | e1b0044c234775bf99ab1a5c794240a9a692ad8d (diff) |
avcodec/h264_parse: Check picture structure when initializing weight table
Fixes: runtime error: index 49 out of bounds for type 'int [48][2][2]'
Fixes: 2159/clusterfuzz-testcase-minimized-5267945972301824
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r-- | libavcodec/h264_parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index bc35a6146e..2564c6c6c3 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -202,7 +202,7 @@ static int scan_mmco_reset(AVCodecParserContext *s, GetBitContext *gb, if ((p->ps.pps->weighted_pred && slice_type_nos == AV_PICTURE_TYPE_P) || (p->ps.pps->weighted_bipred_idc == 1 && slice_type_nos == AV_PICTURE_TYPE_B)) ff_h264_pred_weight_table(gb, p->ps.sps, ref_count, slice_type_nos, - &pwt, logctx); + &pwt, p->picture_structure, logctx); if (get_bits1(gb)) { // adaptive_ref_pic_marking_mode_flag int i; |