diff options
author | Eduardo Chappa <chappa@washington.edu> | 2018-01-28 05:41:12 -0700 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2018-01-28 05:41:12 -0700 |
commit | e7c661ea1ac16aacd51c179878cda8eded74414c (patch) | |
tree | 1dc5b5f00e1090d598142ee29613d6bc2f750fac | |
parent | e90f28bcc9d6e77d567bef2671c870bcd1c78719 (diff) | |
download | alpine-e7c661ea1ac16aacd51c179878cda8eded74414c.tar.xz |
* Different systems implement strncpy and memmove in different ways.
Some add trailing nulls, some don't. We tie off the forward subject at
the location where it should end. Reported by Ferdinand Goldman.
-rw-r--r-- | pith/reply.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pith/reply.c b/pith/reply.c index c7a481f4..2aa9ba22 100644 --- a/pith/reply.c +++ b/pith/reply.c @@ -2237,7 +2237,7 @@ forward_subject(ENVELOPE *env, int flags) snprintf(tmp_20k_buf+2000, SIZEOF_20KBUF-2000, "%s (fwd)", tmp_20k_buf); tmp_20k_buf[SIZEOF_20KBUF-2000-1] = '\0'; memmove(tmp_20k_buf, tmp_20k_buf+2000, strlen(tmp_20k_buf+2000)); - tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; + tmp_20k_buf[strlen(tmp_20k_buf+2000)] = '\0'; } /* |