avcodec/h264_slice: Use w/h from the AVFrame instead of mb_w/h
Fixes out of array access
Fixes: asan_heap-oob_4d5bb0_682_cov_3124593265_Fraunhofer__a_driving_force_in_innovation__small.mp4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 330863c9f1
)
Conflicts:
libavcodec/h264_slice.c
This commit is contained in:

committed by
Michael Niedermayer

parent
c6e16ec711
commit
47a5cde6ac
@@ -1699,8 +1699,8 @@ int ff_h264_decode_slice_header(H264Context *h, H264Context *h0)
|
|||||||
(const uint8_t **)prev->f.data,
|
(const uint8_t **)prev->f.data,
|
||||||
prev->f.linesize,
|
prev->f.linesize,
|
||||||
prev->f.format,
|
prev->f.format,
|
||||||
h->mb_width * 16,
|
prev->f.width,
|
||||||
h->mb_height * 16);
|
prev->f.height);
|
||||||
h->short_ref[0]->poc = prev->poc + 2;
|
h->short_ref[0]->poc = prev->poc + 2;
|
||||||
}
|
}
|
||||||
h->short_ref[0]->frame_num = h->prev_frame_num;
|
h->short_ref[0]->frame_num = h->prev_frame_num;
|
||||||
|
Reference in New Issue
Block a user