X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_libesmtp.c;h=82e1a5f35602d5969fd12355b6715ecb4f0a0e2a;hp=c2172981a03886e89d12bc0e156576360f49e40f;hb=8fdb4b6b3ef01527b99bdcb1c0542cb2abf1056a;hpb=c8e3d1cce2a8af0b4725e1a751f8795bf04487da diff --git a/mutt_libesmtp.c b/mutt_libesmtp.c index c217298..82e1a5f 100644 --- a/mutt_libesmtp.c +++ b/mutt_libesmtp.c @@ -144,7 +144,7 @@ static const char *_mutt_libesmtp_messagefp_cb (void **buf, int *len, int octets; if (*buf == NULL) - *buf = malloc (BUFLEN); + *buf = xmalloc(BUFLEN); if (len == NULL) { rewind ((FILE *) arg); @@ -158,7 +158,7 @@ static const char *_mutt_libesmtp_messagefp_cb (void **buf, int *len, char *p = strchr (*buf, '\0'); if (p[-1] == '\n' && p[-2] != '\r') { - strcpy (p - 1, "\r\n"); + m_strcpy(p - 1, *buf + BUFLEN - p + 1, "\r\n"); p++; } octets = p - (char *) *buf;