summaryrefslogtreecommitdiff
path: root/vp8/common/postproc.c
diff options
context:
space:
mode:
authorJerome Jiang <jianj@google.com>2018-05-23 15:43:00 -0700
committerJerome Jiang <jianj@google.com>2018-05-25 10:46:26 -0700
commit52add5896661d186dec284ed646a4b33b607d2c7 (patch)
treea1d0f9cef9775892967d27b0043bf13e266170ce /vp8/common/postproc.c
parent276cafb7a764cd476c5167a77660984a9cf98ad5 (diff)
downloadlibvpx-52add5896661d186dec284ed646a4b33b607d2c7.tar
libvpx-52add5896661d186dec284ed646a4b33b607d2c7.tar.gz
libvpx-52add5896661d186dec284ed646a4b33b607d2c7.tar.bz2
libvpx-52add5896661d186dec284ed646a4b33b607d2c7.zip
VP8: Fix use-after-free in postproc.
The pointer in vp8 postproc refers to show_frame_mi which is only updated on show frame. However, when there is a no-show frame which also changes the size (thus new frame buffers allocated), show_frame_mi is not updated with new frame buffer memory. Change the pointer in postproc to mi which is always updated. Bug: 842265 Change-Id: I33874f2112b39f74562cba528432b5f239e6a7bd
Diffstat (limited to 'vp8/common/postproc.c')
-rw-r--r--vp8/common/postproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vp8/common/postproc.c b/vp8/common/postproc.c
index d67ee8a57..8c292d616 100644
--- a/vp8/common/postproc.c
+++ b/vp8/common/postproc.c
@@ -65,7 +65,7 @@ void vp8_deblock(VP8_COMMON *cm, YV12_BUFFER_CONFIG *source,
double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
int ppl = (int)(level + .5);
- const MODE_INFO *mode_info_context = cm->show_frame_mi;
+ const MODE_INFO *mode_info_context = cm->mi;
int mbr, mbc;
/* The pixel thresholds are adjusted according to if or not the macroblock