Commit 398d8b4e authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Restrict nTimeout to 0-32767, since it is a 16bit value in X.

parent 52b6bd95
......@@ -413,6 +413,9 @@ int X11DRV_GetScreenSaveTimeout(void)
*/
void X11DRV_SetScreenSaveTimeout(int nTimeout)
{
/* timeout is a 16bit entity (CARD16) in the protocol, so it should
* not get over 32767 or it will get negative. */
if (nTimeout>32767) nTimeout = 32767;
TSXSetScreenSaver(display, nTimeout, 60, DefaultBlanking, DefaultExposures);
}
......
Markdown is supported
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