aboutsummaryrefslogtreecommitdiff
path: root/blaze822.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-01-13 21:27:54 +0100
committerLeah Neukirchen <leah@vuxu.org>2018-01-13 21:27:54 +0100
commiteffc645f8a83aa41e758da45bcfe08ad9c3c41a3 (patch)
tree4e746255dc22c94c2cd1bc84718f593f65ea96ac /blaze822.c
parent13b4ad9a19f46ea0135c114b4094469c618819e5 (diff)
downloadmblaze-effc645f8a83aa41e758da45bcfe08ad9c3c41a3.tar.gz
blaze822: safe_append: off by one
Diffstat (limited to 'blaze822.c')
-rw-r--r--blaze822.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blaze822.c b/blaze822.c
index e02f4aa..9e25992 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -158,7 +158,7 @@ safe_append(char *dst, size_t dstmax, char *strbeg, char *strend)
if (dstmax - dstlen - 1 < strend - strbeg)
strend = strbeg + (dstmax - dstlen - 1);
memcpy(dst + dstlen, strbeg, strend - strbeg);
- dst[dstlen + (strend - strbeg) + 1] = 0;
+ dst[dstlen + (strend - strbeg)] = 0;
return strend - strbeg;
}