mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
6539281: -Xcheck:jni should validate char* argument to ReleaseStringUTFChars
Tag allocated memory with a magic value and verify when releasing. Reviewed-by: phh, stefank
This commit is contained in:
parent
dd62e29b29
commit
1765b0fbf0
4 changed files with 65 additions and 17 deletions
|
@ -104,6 +104,7 @@ class java_lang_String : AllStatic {
|
|||
|
||||
// String converters
|
||||
static char* as_utf8_string(oop java_string);
|
||||
static char* as_utf8_string(oop java_string, char* buf, int buflen);
|
||||
static char* as_utf8_string(oop java_string, int start, int len);
|
||||
static char* as_platform_dependent_str(Handle java_string, TRAPS);
|
||||
static jchar* as_unicode_string(oop java_string, int& length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue