]> granicus.if.org Git - php/commitdiff
Prevent potential crash
authorDavid Eriksson <eriksson@php.net>
Thu, 9 Aug 2001 22:00:05 +0000 (22:00 +0000)
committerDavid Eriksson <eriksson@php.net>
Thu, 9 Aug 2001 22:00:05 +0000 (22:00 +0000)
ext/satellite/namedvalue_to_zval.c

index 86fb2cb247b267400247bbbdf7f8bf4580931a60..e024daf56afc832186cf678a78be1716795298c5 100644 (file)
@@ -56,8 +56,15 @@ static zend_bool satellite_any_to_zval_long(
                const CORBA_any * pSource, zval * pDestination)
 {
        CORBA_long * p_value = (CORBA_long *)pSource->_value;
-       ZVAL_LONG(pDestination, *p_value);
-       return TRUE;
+       if (p_value)
+       {
+               ZVAL_LONG(pDestination, *p_value);
+               return TRUE;
+       }
+       else
+       {
+               return FALSE;
+       }
 }
 
 static zend_bool satellite_any_to_zval_short(