diff options
author | Knut Petersen <Knut_Petersen@t-online.de> | 2013-02-26 07:52:59 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-04-15 13:30:58 +1000 |
commit | 4bff442ec5aa4b93a3f5c11782d4b7b9d1ae13ac (patch) | |
tree | 14ff85f0ab7ee95a50645d206b87d755f2be62ee /Xi | |
parent | 9003399708936481083424b4ff8f18a16b88b7b3 (diff) |
Never try to execute BellProcPtr NULL.
This prevents xts XI/XDeviceBell-2 test
from segfaulting the server.
Signed-off-by: Knut Petersen <Knut_Petersen@t-online.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/devbell.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |