mirror of
https://github.com/php/php-src.git
synced 2025-08-20 01:14:28 +02:00
add range check
This commit is contained in:
parent
0ebf9a11f9
commit
7da32cb56b
1 changed files with 5 additions and 0 deletions
|
@ -214,6 +214,11 @@ PHP_FUNCTION(dom_namednodemap_item)
|
|||
return;
|
||||
}
|
||||
if (index >= 0) {
|
||||
if (ZEND_LONG_INT_OVFL(index)) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid index");
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
intern = Z_DOMOBJ_P(id);
|
||||
|
||||
objmap = (dom_nnodemap_object *)intern->ptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue