eina: provide full string length to vsnprintf to allow for null character

Summary: fix T6903

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric

Maniphest Tasks: T6903

Differential Revision: https://phab.enlightenment.org/D6009
This commit is contained in:
Mike Blumenkrantz 2018-04-26 12:24:16 -04:00
parent bef66f507d
commit e0f8e65d20
1 changed files with 1 additions and 1 deletions

View File

@ -674,7 +674,7 @@ eina_stringshare_nprintf(unsigned int len, const char *fmt, ...)
tmp = alloca(sizeof(char) * (len + 1));
va_start(args, fmt);
size = vsnprintf(tmp, len, fmt, args);
size = vsnprintf(tmp, len + 1, fmt, args);
va_end(args);
if (size < 1)