mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-15 13:21:09 +08:00
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>
This commit is contained in:
@@ -1801,7 +1801,8 @@ static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,
|
||||
(pps->weighted_bipred_idc == 1 &&
|
||||
sl->slice_type_nos == AV_PICTURE_TYPE_B)) {
|
||||
ret = ff_h264_pred_weight_table(&sl->gb, sps, sl->ref_count,
|
||||
sl->slice_type_nos, &sl->pwt, h->avctx);
|
||||
sl->slice_type_nos, &sl->pwt,
|
||||
picture_structure, h->avctx);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user