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 <[email protected]>
---
 src/FreeType/ftfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
     }
-- 
2.8.3

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to