forked from enlightenment/efl
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:
parent
bef66f507d
commit
e0f8e65d20
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue