|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-12-30 04:05 UTC] bugreports at internot dot info
Description:
------------
Hi,
In /ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c:
508 if ((filter->status & 0xf) == 1 &&
509 filter->cache >= 0 && filter->cache <= jisx0213_u2_tbl_len) {
This implies that filter->cache can be between (inclusive) 0-25.
Then:
514 c1 = jisx0213_u2_tbl[2*k];
If k is 25, it will evaluate to 50.
It also may occur here:
519 if (c == jisx0213_u2_tbl[2*k+1]) {
Thanks,
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 15:00:01 2025 UTC |
There is also questionable code in /ext/mbstring/libmbfl/filters/mbfilter_big5.c: 262 for (k = 0; k < sizeof(cp950_pua_tbl)/(sizeof(unsigned short)*4); k++) { 263 if (c <= cp950_pua_tbl[k][1]) { 264 break; 265 } 266 } 267 c1 = c - cp950_pua_tbl[k][0]; ^^ 'k' may be up to '5', which overruns it, I believe. Thanks,