[php-src] PR #20472: xml: Use safe_emalloc() correctly
| From: | ndossche | Date: | Thu, 13 Nov 2025 21:42:22 +0000 |
| Subject: | [php-src] PR #20472: xml: Use safe_emalloc() correctly | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-34042@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/20472
Author: ndossche
Fortunately, libxml won't allow _at this point in time_ to have more than INT_MAX/5 attributes,
so this doesn't cause issues right now. However, if this limit is ever raised then it can cause
an integer overflow which will cause a heap overflow.
So future-proof this code by properly using safe_emalloc().