diff options
Diffstat (limited to 'src/util/fontnames.c')
-rw-r--r-- | src/util/fontnames.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/fontnames.c b/src/util/fontnames.c index 4460728..43eafc2 100644 --- a/src/util/fontnames.c +++ b/src/util/fontnames.c @@ -65,8 +65,8 @@ xfont2_make_font_names_record(unsigned size) pFN->size = size; if (size) { - pFN->length = malloc(size * sizeof(int)); - pFN->names = malloc(size * sizeof(char *)); + pFN->length = mallocarray(size, sizeof(int)); + pFN->names = mallocarray(size, sizeof(char *)); if (!pFN->length || !pFN->names) { free(pFN->length); free(pFN->names); |