From 1aab604198167cc856df8040043fb3f13dbf1b92 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sun, 20 Feb 2005 18:23:33 +0000 Subject: [PATCH] Simplify Code. --- ext/imap/php_imap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index f900c9b03c..1257731b24 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3169,8 +3169,7 @@ PHP_FUNCTION(imap_mail_compose) efree(tempstring); } else { - mystring = emalloc(strlen(tmp) + 1); - strcpy(mystring, tmp); + mystring = estrdup(tmp); } bod = topbod; @@ -3206,10 +3205,9 @@ PHP_FUNCTION(imap_mail_compose) /* output cookie, mini-header, and contents */ tempstring=emalloc(strlen(mystring)+strlen(tmp)+1); - strcpy(tempstring, mystring); + sprintf(tempstring, "%s%s", mystring, tmp); efree(mystring); mystring=tempstring; - strcat(mystring, tmp); bod=&part->body; -- 2.40.0