mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 09:32:43 +00:00
avcodec/hevc: Fix integer overflow in WPP entry point range check
Fixes: out of array access Fixes: poc.hevc / make_poc.py Fixes: 83WY4xnR87vb Fixes:dad354f38d(avcodec/hevc: Check max ctb addresses for WPP) Found-by: VulnForge Security Research Team <haoyuliu@clouditera.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commitba55f425fd) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -2920,7 +2920,7 @@ static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal)
|
||||
int64_t startheader, cmpt = 0;
|
||||
int j, res = 0;
|
||||
|
||||
if (s->sh.slice_ctb_addr_rs + s->sh.num_entry_point_offsets * sps->ctb_width >= sps->ctb_width * sps->ctb_height) {
|
||||
if (s->sh.slice_ctb_addr_rs + s->sh.num_entry_point_offsets * (int64_t)sps->ctb_width >= sps->ctb_width * (int64_t)sps->ctb_height) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "WPP ctb addresses are wrong (%d %d %d %d)\n",
|
||||
s->sh.slice_ctb_addr_rs, s->sh.num_entry_point_offsets,
|
||||
sps->ctb_width, sps->ctb_height
|
||||
|
||||
Reference in New Issue
Block a user