diff options
author | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2016-05-29 23:29:50 -0700 |
---|---|---|
committer | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2016-05-30 21:25:00 -0700 |
commit | dfa572ea522a3019e91f2de7854b252c629342f2 (patch) | |
tree | 3ee4d44ee9f14fbdde26f795f4c89cd9a0b61411 | |
parent | bee4a764ccef46101dca03c70d4ad1793a5a5d78 (diff) | |
download | xorg-lib-libXfont-dfa572ea522a3019e91f2de7854b252c629342f2.tar.gz |
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>
(cherry picked from commit d0fff111992fed9d9bfbf0c19e136bda9ba1db55)
-rw-r--r-- | src/FreeType/ftfuncs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/FreeType/ftfuncs.c b/src/FreeType/ftfuncs.c index df64f5e..703353d 100644 --- a/src/FreeType/ftfuncs.c +++ b/src/FreeType/ftfuncs.c @@ -622,7 +622,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; } |