diff options
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r-- | ext/imap/php_imap.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |