diff options
Diffstat (limited to 'lib/libX11/src/FontNames.c')
-rw-r--r-- | lib/libX11/src/FontNames.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libX11/src/FontNames.c b/lib/libX11/src/FontNames.c index ec7d90fa2..b78792d6f 100644 --- a/lib/libX11/src/FontNames.c +++ b/lib/libX11/src/FontNames.c @@ -29,6 +29,7 @@ in this Software without prior written authorization from The Open Group. #include <config.h> #endif #include "Xlibint.h" +#include "reallocarray.h" #include <limits.h> char ** @@ -66,7 +67,7 @@ int *actualCount) /* RETURN */ } if (rep.nFonts) { - flist = Xmalloc (rep.nFonts * sizeof(char *)); + flist = Xmallocarray (rep.nFonts, sizeof(char *)); if (rep.length > 0 && rep.length < (INT_MAX >> 2)) { rlen = rep.length << 2; ch = Xmalloc(rlen + 1); |