[php-src] PR #22798: ext/gmp: Fix GMP accepting integer strings with NUL bytes
| From: | LamentXU123 | Date: | Sat, 18 Jul 2026 15:33:40 +0000 |
| Subject: | [php-src] PR #22798: ext/gmp: Fix GMP accepting integer strings with NUL bytes | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-37141@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22798
Author: LamentXU123
```php
<?php
var_dump(gmp_strval(gmp_init("123\0abc")));
```
```
string(3) "123"
```
The logic of dealing with argument position is copied from
https://github.com/php/php-src/compare/master...LamentXU123:gmp-nul?expand=1#diff-0bdc127cb9fb7a558418fb24dcd2d7249c5031680db06010d9caa4663d945264R677-R681