From 917d4b3c58ef52eb8f945fc4c6ad473dc9566d3e Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 30 Oct 2019 19:30:02 +0100 Subject: Rootless.c: Fatal error if malloc fails --- nx-X11/programs/Xserver/hw/nxagent/Rootless.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c index 19560ff50..0c04b99a7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c @@ -469,8 +469,12 @@ int nxagentExportProperty(WindowPtr pWin, #ifdef _XSERVER64 else if (strcmp(typeS, "CARDINAL") == 0 || strcmp(typeS, "WM_SIZE_HINTS") == 0) { - /* FIXME: is it okay here to ignore malloc fails? */ unsigned long *buffer = malloc(nUnits * sizeof(*buffer)); + if (buffer == NULL) + { + FatalError("%s: malloc() failed.", __func__); + } + int *input = value; if (buffer) -- cgit v1.2.3