Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayIndexOutOfBound Problem in EncodingDetect utf16_probability #7

Open
barryzhan2017 opened this issue Jul 8, 2020 · 0 comments
Open

Comments

@barryzhan2017
Copy link

In line 736 to 739, the if statement:
if (rawtext.length > 1 && ((byte) 0xFE == rawtext[0] && (byte) 0xFF == rawtext[1]) || ((byte) 0xFF == rawtext[0] && (byte) 0xFE == rawtext[1]))
It can potentially cause ArrayIndexOutOfBound When rawtext.length <= 1 and gets to (byte) 0xFF == rawtext[0] && (byte) 0xFE == rawtext[1])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant