Commit graph

71 commits

Author SHA1 Message Date
Christoph M. Becker
d01453b129 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #54598 (bcpowmod() may return 1 if modulus is 1)
2017-09-07 00:38:59 +02:00
Christoph M. Becker
b2919853f8 Fixed bug #54598 (bcpowmod() may return 1 if modulus is 1)
`x mod 1` is always zero; we have to take the scale into account,
though.
2017-09-07 00:30:05 +02:00
Christoph M. Becker
5ce744091c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #44995 (bcpowmod() fails if scale != 0)
2017-09-06 23:41:46 +02:00
Christoph M. Becker
dea41f3c3a Fixed bug #44995 (bcpowmod() fails if scale != 0)
`bc_divmod()` is supposed to do integer division, so we must not apply
a scale factor here.
2017-09-06 23:30:53 +02:00
Christoph M. Becker
cf61ec64a4 Merge branch 'pull-request/778' into bcscale-return-old-value 2017-09-06 14:28:51 +02:00
Edgar R. Sandi
0608761438 Increased bcmath functions coverage tests using scale option parameter 2017-03-27 18:48:58 +02:00
Libor M
90dcbbe3cb Fixed bug #46564
bcmod() no longer truncates fractionals to integers. This matches
the behavior of fmod(). It also matches the behavior of bcpowmod().
It also matches the behavior of bcmod() in HHVM.
2017-01-07 19:10:31 +01:00
Anatol Belski
25ef19f927 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix/improve tests
2016-04-27 13:19:29 +02:00
Anatol Belski
a21a997478 fix/improve tests 2016-04-27 13:16:57 +02:00
Anatol Belski
33d41da347 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix memory leak
  Fix bug #72099: xml_parse_into_struct segmentation fault
  5.5.36 now
  Fix bug #72094 - Out of bounds heap read access in exif header processing
  Fix bug #72093: bcpowmod accepts negative scale and corrupts _one_ definition
  Fix bug #72061 - Out-of-bounds reads in zif_grapheme_stripos with negative offset
  Fix for bug #71912 (libgd: signedness vulnerability)
  Typo in NEWS
2016-04-27 11:45:29 +02:00
Stanislav Malyshev
d650063a04 Fix bug #72093: bcpowmod accepts negative scale and corrupts _one_ definition
We can not modify result since it can be copy of _zero_ or _one_, etc. and
"copy" in bcmath is just bumping the refcount.
2016-04-24 18:33:32 -07:00
Andrea Faulds
1392102b0c Updated or skipped certain 32-bit tests 2014-12-17 01:06:48 +00:00
Chris Wright
1e3435b289 Return old scale value from bcscale()
Fix for #67855
2014-08-18 13:56:02 +01:00
Xinchen Hui
610c7fbe7b Remove executable permission on phpt 2012-10-10 10:27:49 +08:00
Mateusz Kocielski
17b39638d0 - Fixed bug #60337 bcscale related crashed on 64bits platforms 2011-11-19 12:46:43 +00:00
William Martin
d42fd45f97 Add some bcmath tests 2010-03-08 15:16:51 +00:00
Zoe Slattery
b964306fd7 add missing skipifs 2009-08-31 19:22:29 +00:00
Zoe Slattery
d84163c639 bc math tests from testfest 2009 2009-08-30 11:10:20 +00:00
foobar
b02dd10e03 SKIP -> SKIPIF 2003-04-16 02:21:30 +00:00
Sander Roobol
b8cf1a369f Hardcode the bcmath.scale ini-entry 2002-11-21 16:16:38 +00:00
Sander Roobol
f4ffead6fa Adding tests for the bcmath extension 2002-11-21 15:24:45 +00:00