Skip to content

Commit

Permalink
VP8: Fix use-after-free in postproc.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jeromejj committed May 25, 2018
1 parent 276cafb commit 52add58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vp8/common/postproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52add58

Please sign in to comment.