From c6c284e64b1f537a3243856cf78cf3f2324e4c2b Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Mon, 26 Nov 2007 15:38:20 +0100 Subject: [PATCH] Initialize Mode with 0 in xf86RandRModeConvert. Asking for trouble if non-initialized values contain random data. --- hw/xfree86/modes/xf86RandR12.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index c1a06b296..61a7db3bd 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -683,11 +683,8 @@ xf86RandRModeConvert (ScrnInfoPtr scrn, RRModePtr randr_mode, DisplayModePtr mode) { - mode->prev = NULL; - mode->next = NULL; - mode->name = NULL; + memset(mode, 0, sizeof(DisplayModeRec)); mode->status = MODE_OK; - mode->type = 0; mode->Clock = randr_mode->mode.dotClock / 1000;