mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-02 11:45:40 +00:00
xi: protect from allocation failure
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt, metux IT consult .
parent
349ba2c3f9
commit
ebd36eeb05
@@ -118,6 +118,8 @@ ProcXGetDeviceDontPropagateList(ClientPtr client)
|
||||
if (count) {
|
||||
rep.count = count;
|
||||
buf = calloc(rep.count, sizeof(XEventClass));
|
||||
if (!buf)
|
||||
return BadAlloc;
|
||||
rep.length = bytes_to_int32(rep.count * sizeof(XEventClass));
|
||||
|
||||
tbuf = buf;
|
||||
|
||||
Reference in New Issue
Block a user