[PATCH 1/1] drm/gma500: dont expose stack, mrst_lvds_find_best_pll

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All components of variable clock should be initialized
to avoid bytes from the kernel stack to be exposed.

Reported-by: Joe Perches <joe@xxxxxxxxxxx>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@xxxxxx>
---
 drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c
index 28bd8f3..0277d85 100644
--- a/drivers/gpu/drm/gma500/oaktrail_crtc.c
+++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c
@@ -195,6 +195,7 @@ static bool mrst_lvds_find_best_pll(const struct gma_limit_t *limit,
 	struct gma_clock_t clock;
 	int err = target;
 
+	memset(clock, 0, sizeof(struct gma_clock_t));
 	memset(best_clock, 0, sizeof(*best_clock));
 
 	for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) {
-- 
2.1.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux