From e90f28bcc9d6e77d567bef2671c870bcd1c78719 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sat, 27 Jan 2018 14:54:46 -0700 Subject: * Crash in forward_subject function, in the memmove function, which was moving memory from allocated areas. Reported by Hisashi T Fujinaka and Ferdinand Goldmann. --- pith/reply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pith/reply.c b/pith/reply.c index 383294ec..c7a481f4 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'; - memmove(tmp_20k_buf, tmp_20k_buf+2000, SIZEOF_20KBUF); + memmove(tmp_20k_buf, tmp_20k_buf+2000, strlen(tmp_20k_buf+2000)); tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; } -- cgit v1.2.3-54-g00ecf