Skip to content

Commit 7729840

Browse files
author
David Eriksson
committed
Prevent potential crash
1 parent 81a7f27 commit 7729840

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ext/satellite/namedvalue_to_zval.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,15 @@ static zend_bool satellite_any_to_zval_long(
5656
const CORBA_any * pSource, zval * pDestination)
5757
{
5858
CORBA_long * p_value = (CORBA_long *)pSource->_value;
59-
ZVAL_LONG(pDestination, *p_value);
60-
return TRUE;
59+
if (p_value)
60+
{
61+
ZVAL_LONG(pDestination, *p_value);
62+
return TRUE;
63+
}
64+
else
65+
{
66+
return FALSE;
67+
}
6168
}
6269

6370
static zend_bool satellite_any_to_zval_short(

0 commit comments

Comments
 (0)