mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
Xi: ProcXGetSelectedExtensionEvents(): protect from allocation failure
If allocation fails, bail out with BadAlloc, instead of segfault. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
036cbb4ff2
commit
0680117493
@@ -128,6 +128,8 @@ ProcXGetSelectedExtensionEvents(ClientPtr client)
|
||||
sizeof(XEventClass);
|
||||
rep.length = bytes_to_int32(total_length);
|
||||
buf = calloc(1, total_length);
|
||||
if (!buf)
|
||||
return BadAlloc;
|
||||
|
||||
tclient = buf;
|
||||
aclient = buf + rep.this_client_count;
|
||||
|
||||
Reference in New Issue
Block a user