Commit 57a25a5f authored by Kangjie Lu's avatar Kangjie Lu Committed by Daniel Vetter

gma/gma500: fix a memory disclosure bug due to uninitialized bytes

`best_clock` is an object that may be sent out. Object `clock`
contains uninitialized bytes that are copied to `best_clock`,
which leads to memory disclosure and information leak.
Signed-off-by: default avatarKangjie Lu <kjlu@umn.edu>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20191018042953.31099-1-kjlu@umn.edu
parent 2b6f5883
...@@ -405,6 +405,8 @@ static bool cdv_intel_find_dp_pll(const struct gma_limit_t *limit, ...@@ -405,6 +405,8 @@ static bool cdv_intel_find_dp_pll(const struct gma_limit_t *limit,
struct gma_crtc *gma_crtc = to_gma_crtc(crtc); struct gma_crtc *gma_crtc = to_gma_crtc(crtc);
struct gma_clock_t clock; struct gma_clock_t clock;
memset(&clock, 0, sizeof(clock));
switch (refclk) { switch (refclk) {
case 27000: case 27000:
if (target < 200000) { if (target < 200000) {
......
Markdown is supported
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