From 4bff442ec5aa4b93a3f5c11782d4b7b9d1ae13ac Mon Sep 17 00:00:00 2001 From: Knut Petersen Date: Tue, 26 Feb 2013 07:52:59 +0100 Subject: Never try to execute BellProcPtr NULL. This prevents xts XI/XDeviceBell-2 test from segfaulting the server. Signed-off-by: Knut Petersen Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer --- Xi/devbell.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Xi') diff --git a/Xi/devbell.c b/Xi/devbell.c index c75b94dee..202c8de18 100644 --- a/Xi/devbell.c +++ b/Xi/devbell.c @@ -142,7 +142,8 @@ ProcXDeviceBell(ClientPtr client) newpercent = base + newpercent; else newpercent = base - newpercent + stuff->percent; + if (proc == NULL) + return BadValue; (*proc) (newpercent, dev, ctrl, class); - return Success; } -- cgit v1.2.3