From 8bee0fbd37c8eee0a17abe4a0afd69ad9ac7105a Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 10 Oct 2020 14:09:07 +0200 Subject: Fix #80213: imap_mail_compose() segfaults on certain $bodies We have to cater to non-associative arrays where the key may be `NULL`; we just skip these elements. Closes GH-6315. --- ext/imap/tests/bug80213.phpt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ext/imap/tests/bug80213.phpt (limited to 'ext/imap/tests') diff --git a/ext/imap/tests/bug80213.phpt b/ext/imap/tests/bug80213.phpt new file mode 100644 index 0000000000..9a7961df77 --- /dev/null +++ b/ext/imap/tests/bug80213.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #80213 (imap_mail_compose() segfaults on certain $bodies) +--SKIPIF-- + +--FILE-- + ['param'], + 'disposition' => ['disp'], +], [ + 'type.parameters' => ['param'], + 'disposition' => ['disp'], +]]; +imap_mail_compose($envelope, $body); +echo "done\n"; +?> +--EXPECT-- +done -- cgit v1.2.1