summaryrefslogtreecommitdiff
path: root/pith/reply.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-01-09 12:07:31 -0700
committerEduardo Chappa <chappa@washington.edu>2018-01-09 12:07:31 -0700
commitf2246f7d298b96a231dcde60cf62711ca22838ed (patch)
tree4bd3d835b0b93ae18f3922c039a1ee24262cb157 /pith/reply.c
parent30507e11007fbacb942016b0a1167104ad2c7d49 (diff)
downloadalpine-f2246f7d298b96a231dcde60cf62711ca22838ed.tar.xz
* Change call from strncpy to memmove in pith/reply.c, in the
forward_subject function, as this causes problems with overlapping memory. The problem exists in slackware 12.4. Reported by Rich Shepard.
Diffstat (limited to 'pith/reply.c')
-rw-r--r--pith/reply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pith/reply.c b/pith/reply.c
index 4c0a6f44..383294ec 100644
--- a/pith/reply.c
+++ b/pith/reply.c
@@ -2236,7 +2236,7 @@ forward_subject(ENVELOPE *env, int flags)
(l < 5 || strcmp(tmp_20k_buf+l-5,"(fwd)"))){
snprintf(tmp_20k_buf+2000, SIZEOF_20KBUF-2000, "%s (fwd)", tmp_20k_buf);
tmp_20k_buf[SIZEOF_20KBUF-2000-1] = '\0';
- strncpy(tmp_20k_buf, tmp_20k_buf+2000, SIZEOF_20KBUF);
+ memmove(tmp_20k_buf, tmp_20k_buf+2000, SIZEOF_20KBUF);
tmp_20k_buf[SIZEOF_20KBUF-1] = '\0';
}