diff options
author | Joe Watkins <krakjoe@php.net> | 2017-07-25 06:51:44 +0100 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2017-07-25 06:51:44 +0100 |
commit | 78ad5e8864feec55e3aecfd96b369a62ffb953ee (patch) | |
tree | e1382a1692befb9d5604616172f6c949bd21cd3c /win32 | |
parent | dbc2ffba822d13e74e37f5ba6e106f163c1008e8 (diff) | |
parent | 69b48f83dfc287a8430cf8e993d0937c5128623f (diff) | |
download | php-git-78ad5e8864feec55e3aecfd96b369a62ffb953ee.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
minor loop optimizations, closes #2633
Diffstat (limited to 'win32')
-rw-r--r-- | win32/sendmail.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/win32/sendmail.c b/win32/sendmail.c index d83663a475..808fc8f5fd 100644 --- a/win32/sendmail.c +++ b/win32/sendmail.c @@ -698,10 +698,15 @@ static int PostHeader(char *RPath, char *Subject, char *mailTo, char *xheaders) size_t i; if (xheaders) { + size_t headers_lc_len; + if (NULL == (headers_lc = estrdup(xheaders))) { return OUT_OF_MEMORY; } - for (i = 0; i < strlen(headers_lc); i++) { + + headers_lc_len = strlen(headers_lc); + + for (i = 0; i < headers_lc_len; i++) { headers_lc[i] = tolower(headers_lc[i]); } } |