From 948bbe50a96c5563a2783f2d9c86a83ded707143 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 4 Jan 2021 17:28:53 +0100 Subject: NXglyph.c: check for malloc error "V575 The potential null pointer is passed into 'memcpy' function. Inspect the first argument." --- nx-X11/programs/Xserver/hw/nxagent/NXglyph.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c index 022ef09f4..8c35af4c4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c @@ -296,6 +296,13 @@ miGlyphs (CARD8 op, else { nxagentGlyphsExtents = (BoxPtr) malloc(sizeof(BoxRec)); + if (!nxagentGlyphsExtents) + { + #ifdef WARNING + fprintf(stderr, "WARNING! Cannot allocate GlyphExtents\n"); + #endif + return; + } GlyphExtents (nlist, list, glyphs, &extents); -- cgit v1.2.3