mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
8011048: Possible reading from unmapped memory in UTF8::as_quoted_ascii()
Pass utf_length parameter to UTF8::as_quoted_ascii() Reviewed-by: dcubed, minqi
This commit is contained in:
parent
388d803077
commit
ba2c11a93a
3 changed files with 8 additions and 6 deletions
|
@ -162,7 +162,7 @@ char* Symbol::as_quoted_ascii() const {
|
|||
const char *ptr = (const char *)&_body[0];
|
||||
int quoted_length = UTF8::quoted_ascii_length(ptr, utf8_length());
|
||||
char* result = NEW_RESOURCE_ARRAY(char, quoted_length + 1);
|
||||
UTF8::as_quoted_ascii(ptr, result, quoted_length + 1);
|
||||
UTF8::as_quoted_ascii(ptr, utf8_length(), result, quoted_length + 1);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue