On Mon, 22 May 2023 13:19:04 GMT, Michael McMahon <micha...@openjdk.org> wrote:

> This PR creates a new version of the JNI utility function 
> JNU_GetStringPlatformChars called JNU_GetStringPlatformCharsStrict, which 
> performs additional validation of the returned string, namely that it does 
> not contain any embedded NULL characters. If any such characters are found 
> the function returns NULL with an IAE pending. The change also switches usage 
> in the networking native code to use the new function.
> 
> This cautious approach was taken rather than changing the behavior of the 
> existing function as each native code area needs to review the effect of 
> making the switch. Otherwise, surprising behavior changes might occur (eg 
> undocumented IAE being thrown to user code instead of some other exception).

This pull request has now been integrated.

Changeset: e7edf8d1
Author:    Michael McMahon <micha...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/e7edf8d1458ff0d66aedbb0086050c36864702f6
Stats:     188 lines in 9 files changed: 163 ins; 1 del; 24 mod

8300038: Make new version of JNU_GetStringPlatformChars which checks for null 
characters

Reviewed-by: dfuchs, naoto

-------------

PR: https://git.openjdk.org/jdk/pull/14083

Reply via email to