1
0
xorg-x11-server/commit-c6c284e.diff

26 lines
790 B
Diff

commit c6c284e64b1f537a3243856cf78cf3f2324e4c2b
Author: Matthias Hopf <mhopf@suse.de>
Date: Mon Nov 26 15:38:20 2007 +0100
Initialize Mode with 0 in xf86RandRModeConvert.
Asking for trouble if non-initialized values contain random data.
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index c1a06b2..61a7db3 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;