aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-04-26 12:24:16 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-04-26 12:24:16 -0400
commite0f8e65d2044d49df4fd6355e7835a5f01d854e7 (patch)
tree9edaef0ffc074354d592e2a51ccc69c709fc1f3a
parenteolian: check event vs function/part conflicts as well (diff)
downloadefl-e0f8e65d2044d49df4fd6355e7835a5f01d854e7.tar.gz
eina: provide full string length to vsnprintf to allow for null character
Summary: fix https://phab.enlightenment.org/T6903 Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric Maniphest Tasks: https://phab.enlightenment.org/T6903 Differential Revision: https://phab.enlightenment.org/D6009
-rw-r--r--src/lib/eina/eina_stringshare.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eina/eina_stringshare.c b/src/lib/eina/eina_stringshare.c
index f8510de725..ab9924e69b 100644
--- a/src/lib/eina/eina_stringshare.c
+++ b/src/lib/eina/eina_stringshare.c
@@ -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)