From: Felipe Pena Date: Wed, 26 Jun 2013 00:36:50 +0000 (-0300) Subject: - Fixed bug #62475 (variant_* functions causes crash when null given as an argument) X-Git-Tag: php-5.5.2RC1~22^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42896968282a607a26e4aa152d3c8dc90dad5826;p=php - Fixed bug #62475 (variant_* functions causes crash when null given as an argument) --- diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index 8289322d6d..556f356b97 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -102,8 +102,9 @@ PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codep { OLECHAR *olestring; php_com_dotnet_object *obj; + zend_uchar ztype = (z == NULL ? IS_NULL : Z_TYPE_P(z)); - switch (Z_TYPE_P(z)) { + switch (ztype) { case IS_NULL: V_VT(v) = VT_NULL; break;