mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Merge branch 'PHP-8.4'
* PHP-8.4: Leak in failed unserialize() with opcache
This commit is contained in:
13
ext/standard/tests/serialize/oss_fuzz_433303828.phpt
Normal file
13
ext/standard/tests/serialize/oss_fuzz_433303828.phpt
Normal file
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
OSS-Fuzz #433303828
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
unserialize('O:2:"yy": ');
|
||||
unserialize('O:2:"yy":: ');
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: unserialize(): Error at offset 9 of 10 bytes in %s on line %d
|
||||
|
||||
Warning: unserialize(): Error at offset 10 of 11 bytes in %s on line %d
|
||||
@@ -1312,10 +1312,12 @@ object ":" uiv ":" ["] {
|
||||
YYCURSOR = *p;
|
||||
|
||||
if (*(YYCURSOR) != ':') {
|
||||
zend_string_release_ex(class_name, 0);
|
||||
return 0;
|
||||
}
|
||||
if (*(YYCURSOR+1) != '{') {
|
||||
*p = YYCURSOR+1;
|
||||
zend_string_release_ex(class_name, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user