1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/sysvmsg/tests/gh16592.phpt
David Carlier 90aac521fd Fix GH-16592 msg_send() crashes when the type does not serialize as expected.
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
2024-11-03 13:39:24 +00:00

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