From 0a9c2ce02798de4b62ba5bf309dd056732bb369b Mon Sep 17 00:00:00 2001 From: englebass Date: Tue, 3 Aug 2010 19:31:24 +0000 Subject: [PATCH] alloc the right amount of mem sizeof(char) is 1, and sizeof(char *) is wrong for strings git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/efreet@50782 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/efreet_ini.c | 2 +- src/lib/efreet_menu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/efreet_ini.c b/src/lib/efreet_ini.c index 05591a5..daf1f53 100644 --- a/src/lib/efreet_ini.c +++ b/src/lib/efreet_ini.c @@ -522,7 +522,7 @@ efreet_ini_localestring_get(Efreet_Ini *ini, const char *key) if (country) maxlen += strlen(country); if (modifier) maxlen += strlen(modifier); - buf = alloca(maxlen * sizeof(char)); + buf = alloca(maxlen); if (lang && modifier && country) { diff --git a/src/lib/efreet_menu.c b/src/lib/efreet_menu.c index 47647e8..8f3f404 100644 --- a/src/lib/efreet_menu.c +++ b/src/lib/efreet_menu.c @@ -953,7 +953,7 @@ efreet_menu_dump(Efreet_Menu *menu, const char *indent) size_t len; len = strlen(indent) + 3; - new_indent = alloca(sizeof(char *) * len); + new_indent = alloca(len); snprintf(new_indent, len, "%s ", indent); EINA_LIST_FOREACH(menu->entries, l, entry) -- 2.7.4