-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
ArrayIndexOutOfBoundsException
in CBORParser
for invalid UTF-8 String
#236
Comments
@fmeum Thank you for reporting this, I'll need to have a look. |
Ah. So this is broken encoding; the last byte is broken initial byte of 2-byte UTF-8 character, which is why illegal access is made. |
ArrayIndexOutOfBoundsException
in CBORParser
for invalid UTF-8 String value
Fixed for 2.12.2; 2 problems:
Slightly worried about (2) in a patch release (and hence no backport for 2.11) since while validation really should be done, no doubt some content exist where "it used to 'work'" (i.e. butchered occasionally mis-encoded character but no one noticed, or some validation removed that garbage later on), but we'll see. |
ArrayIndexOutOfBoundsException
in CBORParser
for invalid UTF-8 String valueArrayIndexOutOfBoundsException
in CBORParser
for invalid UTF-8 String
The following Java snippet crashes with an
ArrayIndexOutOfBoundsException
inCBORParser._finishShortText
:The stack trace with version 2.12.1 is:
This issue appears to be caused by missing bounds checks in the cases of this switch statement.
The text was updated successfully, but these errors were encountered: