diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-01 16:33:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-01 16:33:38 +0300 |
commit | 036ae997e7dcd368caedd5cd00697f42da9b21bb (patch) | |
tree | ed2b35739485260f5a618a109eefb4635424a8d5 /src/emap/utils/formatutils.c | |
parent | c5c81196bca1239e075ac434343b13f8c2cfc447 (diff) | |
download | plugin-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/formatutils.c')
-rw-r--r-- | src/emap/utils/formatutils.c | 2 |
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 ++; |