From 7edc639b9ff1c3576773d79d016abbeed1f93846 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sun, 11 Nov 2018 10:04:01 -0800 Subject: 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). --- ext/imap/php_imap.c | 1 - 1 file changed, 1 deletion(-) (limited to 'ext/imap/php_imap.c') 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)) { -- cgit v1.2.1