diff options
author | Felipe Pena <felipensp@gmail.com> | 2013-06-25 21:36:50 -0300 |
---|---|---|
committer | Felipe Pena <felipensp@gmail.com> | 2013-06-25 21:36:50 -0300 |
commit | 42896968282a607a26e4aa152d3c8dc90dad5826 (patch) | |
tree | c519c3e0cee782a26d622d413233a8207d823130 /ext/com_dotnet | |
parent | a689fde2bf77d950901edb6be28dcfa9a8ff0b9c (diff) | |
download | php-git-42896968282a607a26e4aa152d3c8dc90dad5826.tar.gz |
- Fixed bug #62475 (variant_* functions causes crash when null given as an argument)
Diffstat (limited to 'ext/com_dotnet')
-rw-r--r-- | ext/com_dotnet/com_variant.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |