(no title)
jared0x90 | 7 years ago
https://chromium.googlesource.com/chromium/src/+/c368e30ae55...
for(i=0; i<nChar; i++){
if( n>=nByte ) return 0; /* Input contains fewer than nChar chars */
if( (unsigned char)p[n++]>=0xc0 ){
- while( (p[n] & 0xc0)==0x80 ) n++;
+ while( (p[n] & 0xc0)==0x80 ){
+ n++;
+ if( n>=nByte ) break;
+ }
}
}
return n;
Looks like there may have been an issue in parsing malformed multibyte unicode characters properly.
jared0x90|7 years ago