summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-05-29 23:29:50 -0700
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-05-29 23:35:02 -0700
commitd0fff111992fed9d9bfbf0c19e136bda9ba1db55 (patch)
tree84d3de3a4d622c102d9c6373316271034b1a8ac0
parenteefc0b0b908eb8533e704d7156ce983ad7891cc5 (diff)
FreeType: Correct an allocation size
Found by clang static analysis: Result of 'calloc' is converted to a pointer of type 'int', which is incompatible with sizeof operand type 'int *' This is likely benign because the old size was larger on any platform where sizeof(int) <= sizeof(void *), which is everywhere. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
-rw-r--r--src/FreeType/ftfuncs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/FreeType/ftfuncs.c b/src/FreeType/ftfuncs.c
index bbd4db4..e7c8026 100644
--- a/src/FreeType/ftfuncs.c
+++ b/src/FreeType/ftfuncs.c
@@ -623,7 +623,7 @@ FreeTypeInstanceFindGlyph(unsigned idx_in, int flags, FTInstancePtr instance,
offset = idx - segment * FONTSEGMENTSIZE;
if((*available)[segment] == NULL) {
- (*available)[segment] = calloc(FONTSEGMENTSIZE, sizeof(int *));
+ (*available)[segment] = calloc(FONTSEGMENTSIZE, sizeof(int));
if((*available)[segment] == NULL)
return AllocError;
}