com php-src: - Fixed bug #62475 (variant_* functions ca uses crash when null given as an argument): ext/com_dotnet/com_variant.c

From: Date: Wed, 26 Jun 2013 00:36:50 +0000
Subject: com php-src: - Fixed bug #62475 (variant_* functions ca uses crash when null given as an argument): ext/com_dotnet/com_variant.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-72502@lists.php.net to get a copy of this message
Commit: 42896968282a607a26e4aa152d3c8dc90dad5826 Author: Felipe Pena <felipensp@gmail.com> Tue, 25 Jun 2013 21:36:50 -0300 Parents: a689fde2bf77d950901edb6be28dcfa9a8ff0b9c Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=42896968282a607a26e4aa152d3c8dc90dad5826 Log: - Fixed bug #62475 (variant_* functions causes crash when null given as an argument) Bugs: https://bugs.php.net/62475 Changed paths: M ext/com_dotnet/com_variant.c Diff: diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index 8289322..556f356 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;

« previous php.cvs (#72502) next »