ref: 15879fb457880e7bae2e06dd6d8d7fd699be3ab7
parent: f07733010bb1416deef0f6af6fd0489941844949
parent: bc3c6d0a1566541f6b45a6ef76d2b7262483efec
author: James Zern <[email protected]>
date: Fri May 3 07:27:45 EDT 2013
Merge "vp9/count_segs: fix out of bounds read" into experimental
--- a/vp9/encoder/vp9_segmentation.c
+++ b/vp9/encoder/vp9_segmentation.c
@@ -123,11 +123,12 @@
int bw, int bh, int mi_row, int mi_col) {
VP9_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &cpi->mb.e_mbd;
- const int segment_id = mi->mbmi.segment_id;
+ int segment_id;
if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols)
return;
+ segment_id = mi->mbmi.segment_id;
xd->mode_info_context = mi;
set_mi_row_col(cm, xd, mi_row, bh, mi_col, bw);