1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 10:16:41 +02:00
Files
archived-php-src/ext/imap/tests/bug77020.phpt
T
Stanislav Malyshev 7edc639b9f 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).
2018-12-03 00:00:56 -08:00

16 lines
306 B
PHP

--TEST--
Bug #77020 (null pointer dereference in imap_mail)
--SKIPIF--
<?php
if (!extension_loaded('imap')) die('skip imap extension not available');
?>
--FILE--
<?php
imap_mail('1', 1, NULL);
?>
===DONE===
--EXPECTF--
Warning: imap_mail(): No message string in mail command in %s on line %d
%s
===DONE===