Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix buffer overrun due to integer overflow in bcmath
Summary: scale gets passed around as an int inside the library. Reviewed By: mxw Differential Revision: D3624520 fbshipit-source-id: d39927413cec24fda2e475a296ad5d9019ccef0a
- Loading branch information
mwilliams@fb.com
authored and
Hhvm Bot
committed
Aug 1, 2016
1 parent
2c9a8fc
commit c00fc9d
Showing
3 changed files
with
25 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <?php | ||
|
|
||
| $intMaxPre = PHP_INT_MAX - 1; | ||
| $stringNormal = 'abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ'; | ||
|
|
||
| $number_bccomp_10 = bccomp("2015.5", $stringNormal, $intMaxPre); | ||
| var_dump($number_bccomp_10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| int(1) |