mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-28 00:30:07 +01:00
Xi: handle allocation failure in ProcXGetDeviceDontPropagateList()
Reported in #1817:
xwayland-24.1.6/redhat-linux-build/../Xi/getprop.c:163:25:
warning[-Wanalyzer-possible-null-dereference]:
dereference of possibly-NULL ‘buf’
xwayland-24.1.6/redhat-linux-build/../Xi/getprop.c:121:19:
acquire_memory: this call could return NULL
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 7b18313e2a)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2077>
This commit is contained in:
parent
995fe28ebf
commit
fd6d04089c
1 changed files with 2 additions and 0 deletions
|
|
@ -119,6 +119,8 @@ ProcXGetDeviceDontPropagateList(ClientPtr client)
|
|||
if (count) {
|
||||
rep.count = count;
|
||||
buf = xallocarray(rep.count, sizeof(XEventClass));
|
||||
if (buf == NULL)
|
||||
return BadAlloc;
|
||||
rep.length = bytes_to_int32(rep.count * sizeof(XEventClass));
|
||||
|
||||
tbuf = buf;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue