[php-src] PR #15669: Fix GH-15654: Signed integer overflow in ext/dom/nodelist.c
| From: | nielsdos | Date: | Fri, 30 Aug 2024 23:04:47 +0000 |
| Subject: | [php-src] PR #15669: Fix GH-15654: Signed integer overflow in ext/dom/nodelist.c | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-28307@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/15669
Author: nielsdos
There's implicit truncation casts from zend_long to int which cause issues because checks are
done against the zend_longs. Since the iterator infrastructure uses zend_longs, just convert
everything to zend_long.
Technically, there's a behaviour bug that this will also cause on PHP 8.2, but let's not
risk anything as people are unlikely to hit that anyway (they'd need more than 2**32 child
nodes).