stefan pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=63677ba6849debc02613f205d8033d72e88cd120

commit 63677ba6849debc02613f205d8033d72e88cd120
Author: Stefan Schmidt <ste...@osg.samsung.com>
Date:   Mon Nov 30 21:58:39 2015 +0100

    elm_font: correct argument order for calloc()
    
    calloc() expects count first and the actual size to allocate as second
    argument. Say Thank You to smatch for finding this issues for us.
---
 src/lib/elm_font.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_font.c b/src/lib/elm_font.c
index 1f34681..797ecad 100644
--- a/src/lib/elm_font.c
+++ b/src/lib/elm_font.c
@@ -24,7 +24,7 @@ _elm_font_properties_get(Eina_Hash **font_hash,
 
         /* get font name */
         len = token - font;
-        name = calloc(sizeof(char), len + 1);
+        name = calloc(len + 1, sizeof(char));
         if (!name) return NULL;
         strncpy(name, font, len);
 
@@ -68,7 +68,7 @@ _elm_font_properties_get(Eina_Hash **font_hash,
              char *style_old = style;
 
              len = substyle - style;
-             style = calloc(sizeof(char), len + 1);
+             style = calloc(len + 1, sizeof(char));
              if (style)
                {
                   strncpy(style, style_old, len);

-- 


Reply via email to