]> granicus.if.org Git - php/commit
Fix yy_limit computation after encoding switch
authorNikita Popov <nikic@php.net>
Thu, 11 Sep 2014 12:51:02 +0000 (14:51 +0200)
committerNikita Popov <nikic@php.net>
Thu, 11 Sep 2014 12:52:59 +0000 (14:52 +0200)
commite2d4d700cffe4cc7dcd2f486a77e0465ff937a3e
treed1d7100a729e68c19b91d6e48744cd290c5718e6
parentf017843df37028aab161e42368aaa1caaa548322
Fix yy_limit computation after encoding switch

The three assignments above this line are still broken - they assume
that byte offsets in one encoding directly map to byte offsets in
another encoding.

I'm fixing the length here because it is the one causing out-of-bounds
reads and is easy to fix. For the others we'd have to actually compute
new offsets.
Zend/zend_language_scanner.c
Zend/zend_language_scanner.l
ext/mbstring/tests/zend_multibyte-07.phpt
ext/mbstring/tests/zend_multibyte-09.phpt