From: Frank M. Kromann Date: Tue, 26 Nov 2002 07:04:31 +0000 (+0000) Subject: Avoid , at the end of each string (to, cc and bcc) X-Git-Tag: RELEASE_1_0b3~298 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2bf03ccea5fc0c145259a6ba9e084be445c39ce;p=php Avoid , at the end of each string (to, cc and bcc) --- diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 5549c5a3ed..6d23e755ac 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3162,7 +3162,7 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * addr = addr->next; } efree(tempMailTo); - bufferTo[offset] = 0; + if (offset>0) bufferTo[offset-1] = 0; } if (cc && *cc) { @@ -3180,7 +3180,7 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * addr = addr->next; } efree(tempMailTo); - bufferCc[offset] = 0; + if (offset>0) bufferCc[offset-1] = 0; } if (bcc && *bcc) { @@ -3198,7 +3198,7 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * addr = addr->next; } efree(tempMailTo); - bufferBcc[offset] = 0; + if (offset>0) bufferBcc[offset-1] = 0; }