]> granicus.if.org Git - php/commit
Fix #66797: mb_substr only takes 32-bit signed integer
authorChristoph M. Becker <cmbecker69@gmx.de>
Tue, 30 Aug 2016 12:48:24 +0000 (14:48 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Tue, 30 Aug 2016 12:52:47 +0000 (14:52 +0200)
commit2f10db36af2776f386b7433c5cbfe79e66edd14d
tree833f6862c475ae1f556aff1a3e58fd7fee7dfee7
parentaf7828a20f085c6cd2b720b093ee08f299505257
Fix #66797: mb_substr only takes 32-bit signed integer

`from` and `len` are `long`, but get passed to mbfl_substr() which expects
`int`s. Therefore we clamp the values to avoid the undefined conversion
behavior.
NEWS
ext/mbstring/mbstring.c
ext/mbstring/tests/bug66797.phpt [new file with mode: 0644]