Skip to content

Commit 8f8b5ba

Browse files
committed
Merge branch 'PHP-8.3'
* PHP-8.3: Fix possible NULL dereference (crash on Zend/tests/arginfo_zpp_mismatch.phpt)
2 parents caf102d + 25cb2a4 commit 8f8b5ba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ext/zend_test/test.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,11 @@ static ZEND_FUNCTION(zend_test_fill_packed_array)
647647
static ZEND_FUNCTION(get_open_basedir)
648648
{
649649
ZEND_PARSE_PARAMETERS_NONE();
650-
RETURN_STRING(PG(open_basedir));
650+
if (PG(open_basedir)) {
651+
RETURN_STRING(PG(open_basedir));
652+
} else {
653+
RETURN_NULL();
654+
}
651655
}
652656

653657
static zend_object *zend_test_class_new(zend_class_entry *class_type)

0 commit comments

Comments
 (0)