Commit graph

11 commits

Author SHA1 Message Date
Nikita Popov
cafceea742 Update mbstring parameter names
Closes GH-6207.
2020-09-28 09:51:58 +02:00
Alex Dowad
dc98c1346d Additional tests for mbstring extension 2020-08-31 23:15:57 +02:00
Máté Kocsis
6111d64cda
Improve a last couple of argument error messages
Closes GH-5404
2020-04-20 13:09:00 +02:00
Nikita Popov
7d170eb295 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix shift ub in mbstring
  Restore digit check in mb_decode_numericentity()
2020-01-30 10:08:21 +01:00
Nikita Popov
9aadcb18e1 Restore digit check in mb_decode_numericentity()
I replaced it with a multiplication overflow check in
18599f9c52. However, we need both,
because the code for restoring the number can't handle numbers
with many leading zeros right now and I don't feel like teaching it.
2020-01-30 10:07:01 +01:00
Nikita Popov
b2c8abe951 Merge branch 'PHP-7.4'
* PHP-7.4:
  Better overflow check for entity decoding
2020-01-29 16:08:55 +01:00
Nikita Popov
18599f9c52 Better overflow check for entity decoding
Check for multiplication overflow rather than number of digits.
2020-01-29 16:08:46 +01:00
Nikita Popov
bc32cce6a2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix recovery of large entities in mb_decode_numericentity()
2020-01-29 11:49:27 +01:00
Nikita Popov
91f878779c Fix recovery of large entities in mb_decode_numericentity()
Make sure we don't overflow the integer.
2020-01-29 11:48:34 +01:00
Christoph M. Becker
e2100619ac Expect appropriate parameter type in the first place
`mb_encode_numericentity()` and `mb_decode_numericentity()` accepted
arbitrary zvals as `$convmap`, but ignored anything else than arrays.
This appears to be an unresolved relict of their ZPP conversion for
PHP 5.3[1].  We now expect an array in the first place.

We also expect `count($convmap)` to be a multiple of four (else we
throw a `ValueError`), and do no longer special case empty `$convmap`.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=1c77f594294aee9d60e7309279c616c01c39ba9d>
2019-10-07 16:48:08 +02:00
Felipe Pena
b79740b458 - New tests (WurzbrugUG testfest) 2009-07-07 01:15:12 +00:00