Skip to content

Commit 4289696

Browse files
committed
- Fixed bug #62475 (variant_* functions causes crash when null given as an argument)
1 parent a689fde commit 4289696

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/com_dotnet/com_variant.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codep
102102
{
103103
OLECHAR *olestring;
104104
php_com_dotnet_object *obj;
105+
zend_uchar ztype = (z == NULL ? IS_NULL : Z_TYPE_P(z));
105106

106-
switch (Z_TYPE_P(z)) {
107+
switch (ztype) {
107108
case IS_NULL:
108109
V_VT(v) = VT_NULL;
109110
break;

0 commit comments

Comments
 (0)