eina - vpath - silence buffer size truncation warning

add more space in dest buffer to silence warning about possible
truncation by snprintf.
This commit is contained in:
Carsten Haitzler 2018-11-06 16:05:10 +00:00
parent cc9f4b8bd0
commit 07177d540c
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ eina_xdg_env_init(void)
# if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
# define ENV_HOME_SET(_env, _dir, _meta) \
char _meta [PATH_MAX]; \
char _meta [PATH_MAX + 128]; \
if ((getuid() != geteuid()) || (!(s = getenv(_env)))) { \
snprintf(_meta, sizeof(_meta), "%s/"_dir, home); \
s = _meta; \
@ -31,7 +31,7 @@ eina_xdg_env_init(void)
(&user)->_meta = s;
#else
# define ENV_HOME_SET(_env, _dir, _meta) \
char _meta [PATH_MAX]; \
char _meta [PATH_MAX + 128]; \
if (!(s = getenv(_env))) { \
snprintf(_meta, sizeof(_meta), "%s/"_dir, home); \
s = _meta; \