853d51d929
Fix a number of buffer-overflows, privacy-leaks and memory corruptions.
15 lines
554 B
Text
15 lines
554 B
Text
$NetBSD: patch-ep,v 1.1 2008/02/25 15:39:16 joerg Exp $
|
|
|
|
--- hw/xfree86/common/xf86MiscExt.c.orig 2006-11-16 19:01:24.000000000 +0100
|
|
+++ hw/xfree86/common/xf86MiscExt.c
|
|
@@ -640,6 +640,10 @@ MiscExtPassMessage(int scrnIndex, const
|
|
|
|
DEBUG_P("MiscExtPassMessage");
|
|
|
|
+ /* should check this in the protocol, but xf86NumScreens isn't exported */
|
|
+ if (scrnIndex >= xf86NumScreens)
|
|
+ return BadValue;
|
|
+
|
|
if (*pScr->HandleMessage == NULL)
|
|
return BadImplementation;
|
|
return (*pScr->HandleMessage)(scrnIndex, msgtype, msgval, retstr);
|