php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80560 Strings containing only a base prefix return 0 object
Submitted: 2020-12-29 01:24 UTC Modified: -
From: girgias@php.net Assigned:
Status: Closed Package: GNU MP related
PHP Version: 7.4.14RC1 OS:
Private report: No CVE-ID: None
 [2020-12-29 01:24 UTC] girgias@php.net
Description:
------------
This came about in the review of the explicit octal literal RFC implementation.

It turns out that GMP extension will accept the following strings "0B", "0b", "0X", and "0x" as valid strings if, and only if, no base or base = 0 is provided.

Test script:
---------------
https://3v4l.org/ArU7r


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-12-29 01:37 UTC] girgias@php.net
The following pull request has been associated:

Patch Name: Fix Bug #80560: Strings containing only a base prefix return 0 object
On GitHub:  https://github.com/php/php-src/pull/6549
Patch:      https://github.com/php/php-src/pull/6549.patch
 [2020-12-30 11:51 UTC] cmb@php.net
Automatic comment on behalf of girgias
Revision: http://git.php.net/?p=php-src.git;a=commit;h=abecaab09f8d39b5d2d6bc336e91595aae0d5a91
Log: Fix #80560: Strings containing only a base prefix return 0 object
 [2020-12-30 11:51 UTC] cmb@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 14:01:30 2024 UTC