summaryrefslogtreecommitdiff
path: root/src/fontfile/fontdir.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2019-08-03 19:09:19 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2019-08-03 19:31:14 -0700
commitf54470dab5b392380df61a22b4b4bef685b6cee2 (patch)
tree561d2a367f295f3fe53f72712b3b3f3d1011ec18 /src/fontfile/fontdir.c
parent27207d35d4b4bbd5d2b2c5f7e13a61ea43d04a4a (diff)
Convert multiplying realloc calls to use reallocarray instead
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/fontfile/fontdir.c')
-rw-r--r--src/fontfile/fontdir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fontfile/fontdir.c b/src/fontfile/fontdir.c
index 2cc97b4..c07222f 100644
--- a/src/fontfile/fontdir.c
+++ b/src/fontfile/fontdir.c
@@ -185,7 +185,7 @@ FontFileAddEntry(FontTablePtr table, FontEntryPtr prototype)
directory that we should just give up before we overflow. */
return NULL;
newsize = table->size + 100;
- entry = realloc(table->entries, newsize * sizeof(FontEntryRec));
+ entry = reallocarray(table->entries, newsize, sizeof(FontEntryRec));
if (!entry)
return (FontEntryPtr)0;
table->size = newsize;