From 4875a15ca61358a1c95b156b2279fce092451278 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 19 Jan 2022 00:45:43 +0100 Subject: Update libNX_X11 to upstream's libX11-1.7.3.1-10-gd60ede78 --- nx-X11/lib/src/GetPntMap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nx-X11/lib/src/GetPntMap.c') diff --git a/nx-X11/lib/src/GetPntMap.c b/nx-X11/lib/src/GetPntMap.c index 07625f8a0..4219a1101 100644 --- a/nx-X11/lib/src/GetPntMap.c +++ b/nx-X11/lib/src/GetPntMap.c @@ -29,6 +29,7 @@ in this Software without prior written authorization from The Open Group. #include #endif #include "Xlibint.h" +#include "reallocarray.h" #include #ifdef MIN /* some systems define this in */ @@ -112,8 +113,7 @@ XGetKeyboardMapping (Display *dpy, nkeysyms = rep.length; if (nkeysyms > 0) { if (nkeysyms < (INT_MAX / sizeof (KeySym))) { - nbytes = nkeysyms * sizeof (KeySym); - mapping = Xmalloc (nbytes); + mapping = Xmallocarray (nkeysyms, sizeof (KeySym)); } if (! mapping) { _XEatDataWords(dpy, rep.length); -- cgit v1.2.3