From d0fff111992fed9d9bfbf0c19e136bda9ba1db55 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Sequoia Date: Sun, 29 May 2016 23:29:50 -0700 Subject: 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 --- src/FreeType/ftfuncs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3