Commit 63865356 authored by Raphael Isemann's avatar Raphael Isemann
Browse files

Fix uninitialized read in MGAEnableSecondOutPut

`MGAGRestore` allocated `ModeInfo` without initializing its memory and then
passes it into `MGAEnableSecondOutPut` via `MGAEnableSecondOutPut(pScrn, &ModeInfo);`.

`MGAEnableSecondOutPut` then reads the unitialized memory in the line
`if ( !(pModeInfo->flSignalMode & POS_HSYNC) )`.

This patch just zeroes the memory to prevent those branches to be randomly
Signed-off-by: Raphael Isemann's avatarRaphael Isemann <>
parent a6ab1e08
Pipeline #558300 passed with stages
in 1 minute and 52 seconds
......@@ -1754,6 +1754,7 @@ MGA_NOT_HAL(
} else {
/* Second Crtc */
memset( &ModeInfo, 0, sizeof(ModeInfo) );
/* Enable Dual Head */
Supports Markdown
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