-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #78878: Buffer underflow in bc_shift_addsub
We must not rely on `isdigit()` to detect digits, since we only support decimal ASCII digits in the following processing. (cherry picked from commit eb23c60)
- Loading branch information
1 parent
8877854
commit 2d07f00
Showing
2 changed files
with
15 additions
and
2 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,13 @@ | ||
--TEST-- | ||
Bug #78878 (Buffer underflow in bc_shift_addsub) | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('bcmath')) die('skip bcmath extension not available'); | ||
?> | ||
--FILE-- | ||
<?php | ||
print @bcmul("\xB26483605105519922841849335928742092", bcpowmod(2, 65535, -4e-4)); | ||
?> | ||
--EXPECT-- | ||
bc math warning: non-zero scale in modulus | ||
0 |