summaryrefslogtreecommitdiff
path: root/ext/imap/php_imap.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2018-11-11 10:04:01 -0800
committerChristoph M. Becker <cmbecker69@gmx.de>2018-12-03 14:58:14 +0100
commit648fc1e369fc05fb9200a42c7938912236b2a318 (patch)
tree06b1e30e0dd4245c3e3ebe0c31b39ee9687551de /ext/imap/php_imap.c
parentd8b25b34a2bea027465dce2f5962d174a6e000a1 (diff)
downloadphp-git-648fc1e369fc05fb9200a42c7938912236b2a318.tar.gz
Fix #77020: null pointer dereference in imap_mail
If an empty $message is passed to imap_mail(), we must not set message to NULL, since _php_imap_mail() is not supposed to handle NULL pointers (opposed to pointers to NUL). (cherry picked from commit 7edc639b9ff1c3576773d79d016abbeed1f93846)
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r--ext/imap/php_imap.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 9e626a4cfa..01d1a5f80c 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -4116,7 +4116,6 @@ PHP_FUNCTION(imap_mail)
if (!ZSTR_LEN(message)) {
/* this is not really an error, so it is allowed. */
php_error_docref(NULL, E_WARNING, "No message string in mail command");
- message = NULL;
}
if (_php_imap_mail(ZSTR_VAL(to), ZSTR_VAL(subject), ZSTR_VAL(message), headers?ZSTR_VAL(headers):NULL, cc?ZSTR_VAL(cc):NULL,