You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/hevc: allocate entries unconditionally
Fixes out of array access Fixes: 08664a2a7921ef48172f26495c7455be/asan_heap-oob_23036c6_3301_523388ef84285a0270caf67a43247b59.bit Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -2452,11 +2452,9 @@ static int hls_slice_data_wpp(HEVCContext *s, const HEVCNAL *nal)
|
|||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!s->sList[1]) {
|
|
||||||
ff_alloc_entries(s->avctx, s->sh.num_entry_point_offsets + 1);
|
ff_alloc_entries(s->avctx, s->sh.num_entry_point_offsets + 1);
|
||||||
|
|
||||||
|
if (!s->sList[1]) {
|
||||||
for (i = 1; i < s->threads_number; i++) {
|
for (i = 1; i < s->threads_number; i++) {
|
||||||
s->sList[i] = av_malloc(sizeof(HEVCContext));
|
s->sList[i] = av_malloc(sizeof(HEVCContext));
|
||||||
memcpy(s->sList[i], s, sizeof(HEVCContext));
|
memcpy(s->sList[i], s, sizeof(HEVCContext));
|
||||||
|
Reference in New Issue
Block a user