Commit c0856b98 authored by Yaowu Xu's avatar Yaowu Xu Committed by Gerrit Code Review
Browse files

Merge "Fixing out of bounds access in frame_refs[] array."

Showing with 4 additions and 2 deletions
......@@ -756,8 +756,10 @@ static int get_token_alloc(int mb_rows, int mb_cols) {
static void set_ref_ptrs(VP9_COMMON *cm, MACROBLOCKD *xd,
MV_REFERENCE_FRAME ref0, MV_REFERENCE_FRAME ref1) {
xd->block_refs[0] = &cm->frame_refs[ref0 - LAST_FRAME];
xd->block_refs[1] = &cm->frame_refs[ref1 - LAST_FRAME];
xd->block_refs[0] = &cm->frame_refs[ref0 >= LAST_FRAME ? ref0 - LAST_FRAME
: 0];
xd->block_refs[1] = &cm->frame_refs[ref1 >= LAST_FRAME ? ref1 - LAST_FRAME
: 0];
}
#ifdef __cplusplus
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment