Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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).
- Loading branch information
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--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=== |