From 9602cfa6fd4cb63b6aa486462f5873fe19fa342e Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 24 Feb 2025 13:51:20 +0100 Subject: [PATCH] (1823) xi: protect from allocation failure Signed-off-by: Enrico Weigelt, metux IT consult --- Xi/getprop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Xi/getprop.c b/Xi/getprop.c index 7249266bc..63e9a3ba1 100644 --- a/Xi/getprop.c +++ b/Xi/getprop.c @@ -117,6 +117,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;