summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/utils/font-test-utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/utils/font-test-utils.c b/test/utils/font-test-utils.c
index bc4039e..ff05061 100644
--- a/test/utils/font-test-utils.c
+++ b/test/utils/font-test-utils.c
@@ -53,6 +53,7 @@ SOFTWARE.
*/
#include "font-test-utils.h"
+#include "src/util/replace.h"
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
@@ -133,7 +134,8 @@ test_register_fpe_funcs(const xfont2_fpe_funcs_rec *funcs)
xfont2_fpe_funcs_rec const **new;
/* grow the list */
- new = realloc(fpe_functions, (num_fpe_types + 1) * sizeof(xfont2_fpe_funcs_ptr));
+ new = reallocarray(fpe_functions, (num_fpe_types + 1),
+ sizeof(xfont2_fpe_funcs_ptr));
assert (new != NULL);
fpe_functions = new;