summaryrefslogtreecommitdiff
path: root/src/emap/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-01 16:33:38 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-01 16:33:38 +0300
commit036ae997e7dcd368caedd5cd00697f42da9b21bb (patch)
treeed2b35739485260f5a618a109eefb4635424a8d5 /src/emap/utils
parentc5c81196bca1239e075ac434343b13f8c2cfc447 (diff)
downloadplugin-036ae997e7dcd368caedd5cd00697f42da9b21bb.tar.gz
plugin-036ae997e7dcd368caedd5cd00697f42da9b21bb.tar.bz2
plugin-036ae997e7dcd368caedd5cd00697f42da9b21bb.tar.xz
plugin-036ae997e7dcd368caedd5cd00697f42da9b21bb.zip
Fix formatting string issue if parameters too small in size.
Diffstat (limited to 'src/emap/utils')
-rw-r--r--src/emap/utils/formatutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emap/utils/formatutils.c b/src/emap/utils/formatutils.c
index 312b790..f81a5c0 100644
--- a/src/emap/utils/formatutils.c
+++ b/src/emap/utils/formatutils.c
@@ -107,7 +107,7 @@ int format_sub(struct script_state* st, int translate)
sz += len - 2;
if (sz > 490)
break;
- memmove(tmp + len, tmp + 2, strlen(tmp + 2));
+ memmove(tmp + len, tmp + 2, strlen(tmp + 2) + 1);
memcpy(tmp, item, len);
ptr = tmp + len;
idx ++;