Commit fef459ae authored by Neil Fuller's avatar Neil Fuller
Browse files

Add size check in NativeConverter JNI code

Adding an addition check to avoid copying arbitrary-length
bytes/chars into a statically allocated array. In reality
this is very unlikely to happen as the encoder replacement
length is checked in Java via an if (len > maxBytesPerChar)
in all cases. The decoder replacement is either hardcoded
(and below the limit), or checked when it is set via
withReplacement().

Bug: 63876067
Test: Ran org.apache.harmony.tests.java.nio.charset.Charset.*Test
Change-Id: Id6a7c5cc05a72dc84c405fee18e3e5a0f5f6495b
parent 6e97bc6d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment