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
committerStanislav Malyshev <stas@php.net>2018-12-03 00:00:56 -0800
commit7edc639b9ff1c3576773d79d016abbeed1f93846 (patch)
tree9cafc35b020521dd87894a6b321b7335fb2e0ad8 /ext/imap/php_imap.c
parentaabdb71dc3739f5e06916e2a4e24deb37437b1e8 (diff)
downloadphp-git-7edc639b9ff1c3576773d79d016abbeed1f93846.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).
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 a23e84c085..b30440f000 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -4094,7 +4094,6 @@ PHP_FUNCTION(imap_mail)
if (!message_len) {
/* this is not really an error, so it is allowed. */
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No message string in mail command");
- message = NULL;
}
if (_php_imap_mail(to, subject, message, headers, cc, bcc, rpath TSRMLS_CC)) {