hevc: Reject impossible dependent tile
The tile 0 cannot depend on a previous one.
Prevent an out of array bound load in ff_hevc_cabac_init().
Fixes: asan_heap-oob_e3a924_1630_DBLK_A_MAIN10_VIXS_2.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Guillaume Martres <smarter@ubuntu.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 48a5b15543
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:

committed by
Michael Niedermayer

parent
e43805d401
commit
39545c5482
@@ -1775,6 +1775,11 @@ static int hls_decode_entry(AVCodecContext *avctxt, void *isFilterThread)
|
||||
int y_ctb = 0;
|
||||
int ctb_addr_ts = s->pps->ctb_addr_rs_to_ts[s->sh.slice_ctb_addr_rs];
|
||||
|
||||
if (!ctb_addr_ts && s->sh.dependent_slice_segment_flag) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Impossible initial tile.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
while (more_data && ctb_addr_ts < s->sps->ctb_size) {
|
||||
int ctb_addr_rs = s->pps->ctb_addr_ts_to_rs[ctb_addr_ts];
|
||||
|
||||
|
Reference in New Issue
Block a user