summaryrefslogtreecommitdiff
path: root/pith/reply.c
diff options
context:
space:
mode:
Diffstat (limited to 'pith/reply.c')
-rw-r--r--pith/reply.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/pith/reply.c b/pith/reply.c
index 636afa45..92172c05 100644
--- a/pith/reply.c
+++ b/pith/reply.c
@@ -2331,10 +2331,11 @@ forward_subject(ENVELOPE *env, int flags)
removing_trailing_white_space(tmp_20k_buf);
if((l = strlen(tmp_20k_buf)) < 1000 &&
(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';
- memmove(tmp_20k_buf, tmp_20k_buf+2000, strlen(tmp_20k_buf+2000));
- tmp_20k_buf[strlen(tmp_20k_buf+2000)] = '\0';
+ char *s = cpystr(tmp_20k_buf);
+ snprintf(tmp_20k_buf, SIZEOF_20KBUF, "%.1000s (fwd)", s);
+ tmp_20k_buf[SIZEOF_20KBUF-1] = '\0';
+ strcpy(tmp_20k_buf, s);
+ fs_give((void **) &s);
}
/*