mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix GH-16991: Getting typeinfo of non DISPATCH variant segfaults
This commit is contained in:
commit
a4874bb418
3 changed files with 15 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -6,6 +6,10 @@ PHP NEWS
|
||||||
. Fixed jdtogregorian overflow. (David Carlier)
|
. Fixed jdtogregorian overflow. (David Carlier)
|
||||||
. Fixed cal_to_jd julian_days argument overflow. (David Carlier)
|
. Fixed cal_to_jd julian_days argument overflow. (David Carlier)
|
||||||
|
|
||||||
|
- COM:
|
||||||
|
. Fixed bug GH-16991 (Getting typeinfo of non DISPATCH variant segfaults).
|
||||||
|
(cmb)
|
||||||
|
|
||||||
- Core:
|
- Core:
|
||||||
. Fail early in *nix configuration build script. (hakre)
|
. Fail early in *nix configuration build script. (hakre)
|
||||||
. Fixed bug GH-16727 (Opcache bad signal 139 crash in ZTS bookworm
|
. Fixed bug GH-16727 (Opcache bad signal 139 crash in ZTS bookworm
|
||||||
|
|
|
@ -331,7 +331,7 @@ ITypeInfo *php_com_locate_typeinfo(zend_string *type_lib_name, php_com_dotnet_ob
|
||||||
if (obj->typeinfo) {
|
if (obj->typeinfo) {
|
||||||
ITypeInfo_AddRef(obj->typeinfo);
|
ITypeInfo_AddRef(obj->typeinfo);
|
||||||
return obj->typeinfo;
|
return obj->typeinfo;
|
||||||
} else {
|
} else if (V_VT(&obj->v) == VT_DISPATCH) {
|
||||||
IDispatch_GetTypeInfo(V_DISPATCH(&obj->v), 0, LANG_NEUTRAL, &typeinfo);
|
IDispatch_GetTypeInfo(V_DISPATCH(&obj->v), 0, LANG_NEUTRAL, &typeinfo);
|
||||||
if (typeinfo) {
|
if (typeinfo) {
|
||||||
return typeinfo;
|
return typeinfo;
|
||||||
|
|
10
ext/com_dotnet/tests/gh16991.phpt
Normal file
10
ext/com_dotnet/tests/gh16991.phpt
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--TEST--
|
||||||
|
GH-16991 (Getting typeinfo of non DISPATCH variant segfaults)
|
||||||
|
--EXTENSIONS--
|
||||||
|
com_dotnet
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
com_print_typeinfo(new variant("hello"));
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
Warning: com_print_typeinfo(): Unable to find typeinfo using the parameters supplied in %s on line %d
|
Loading…
Add table
Add a link
Reference in a new issue