diff --git a/mail_menu.c b/mail_menu.c index b608f0a..3584224 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -339,6 +339,8 @@ char *external_editor(int socket, struct user_record *user, char *to, char *from body = (char *)realloc(body, totlen + 1); } + + memcpy(&body[totlen - len], buffer, len); body[totlen] = '\0'; @@ -365,6 +367,8 @@ char *external_editor(int socket, struct user_record *user, char *to, char *from for (i=0;i