Initialize Mode with 0 in xf86RandRModeConvert.

Asking for trouble if non-initialized values contain random data.
This commit is contained in:
Matthias Hopf 2007-11-26 15:38:20 +01:00
parent 33b94da632
commit c6c284e64b

View File

@ -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;