mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
It is assumed that the serialization always had initialised its buffer zend_string, but in the case of a type not serialising, it is null. close GH-16599
20 lines
328 B
PHP
20 lines
328 B
PHP
--TEST--
|
|
msg_send() segfault when the type does not serialize as expected
|
|
--EXTENSIONS--
|
|
sysvmsg
|
|
--FILE--
|
|
<?php
|
|
class Test {
|
|
function __serialize() {}
|
|
}
|
|
|
|
$q = msg_get_queue(1);
|
|
try {
|
|
msg_send($q, 1, new Test, true);
|
|
} catch (\TypeError $e) {
|
|
echo $e->getMessage();
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Test::__serialize() must return an array
|