[GIT-PULLS] [php-src] PR #22798: ext/gmp: Fix GMP accepting integer strings with NUL bytes
[email protected] (LamentXU123) Sat, 18 Jul 2026 15:33:40 +0000
| Newsgroups | php.git-pulls |
|---|---|
| Message-ID | <u2pPMEXQK6DhQanXHijnQ79nNCsZsSlHBErsSSDd5V4@main.internal.php.net> |
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