Mercurial > hg > graal-compiler
diff src/share/vm/oops/symbol.cpp @ 8851:8c03fc47511d
8011048: Possible reading from unmapped memory in UTF8::as_quoted_ascii()
Summary: Pass utf_length parameter to UTF8::as_quoted_ascii()
Reviewed-by: dcubed, minqi
author | iklam |
---|---|
date | Mon, 01 Apr 2013 14:05:41 -0700 |
parents | 63e54c37ac64 |
children | a1ebd310d5c1 |
line wrap: on
line diff
--- a/src/share/vm/oops/symbol.cpp Thu Mar 28 15:39:52 2013 +0100 +++ b/src/share/vm/oops/symbol.cpp Mon Apr 01 14:05:41 2013 -0700 @@ -162,7 +162,7 @@ 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; }