aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2021-01-04 17:28:53 +0100
committerUlrich Sibiller <uli42@gmx.de>2021-01-15 19:50:36 +0100
commit948bbe50a96c5563a2783f2d9c86a83ded707143 (patch)
tree0e532d4725251d49397da65916bb13175872dee6 /nx-X11
parent7443fea69f89fda3c36e99dc5ff07731020e8891 (diff)
downloadnx-libs-948bbe50a96c5563a2783f2d9c86a83ded707143.tar.gz
nx-libs-948bbe50a96c5563a2783f2d9c86a83ded707143.tar.bz2
nx-libs-948bbe50a96c5563a2783f2d9c86a83ded707143.zip
NXglyph.c: check for malloc error
"V575 The potential null pointer is passed into 'memcpy' function. Inspect the first argument."
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXglyph.c7
1 files changed, 7 insertions, 0 deletions
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);