cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a988a8fc99be97eb5866ca324bc91f0f20deec09
commit a988a8fc99be97eb5866ca324bc91f0f20deec09 Author: Vincent Torri <vincent.to...@gmail.com> Date: Fri May 15 09:03:48 2015 +0200 eina: use less stack on Windows for eina_environment_home_get, and no snprintf() Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/eina/eina_util.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/eina/eina_util.c b/src/lib/eina/eina_util.c index 392eee3..4f04084 100644 --- a/src/lib/eina/eina_util.c +++ b/src/lib/eina/eina_util.c @@ -41,7 +41,7 @@ *============================================================================*/ #ifdef _WIN32 -static char home_storage[PATH_MAX]; +static char home_storage[8]; #endif EAPI const char * @@ -55,8 +55,9 @@ eina_environment_home_get(void) if (!home && (getenv("HOMEDRIVE") && getenv("HOMEPATH"))) { - snprintf(home_storage, sizeof(home_storage), "%s%s", - getenv("HOMEDRIVE"), getenv("HOMEPATH")); + memcpy(home_storage, getenv("HOMEDRIVE"), strlen(getenv("HOMEDRIVE"))); + memcpy(home_storage + strlen(getenv("HOMEDRIVE")), + getenv("HOMEPATH"), strlen(getenv("HOMEPATH")) + 1); home = home_storage; } if (!home) home = "C:\\"; --