diff src/share/vm/utilities/utf8.hpp @ 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 bd7a7ce2e264
children
line wrap: on
line diff
--- a/src/share/vm/utilities/utf8.hpp	Thu Mar 28 15:39:52 2013 +0100
+++ b/src/share/vm/utilities/utf8.hpp	Mon Apr 01 14:05:41 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,7 +45,7 @@
   static int quoted_ascii_length(const char* utf8_str, int utf8_length);
 
   // converts a utf8 string to quoted ascii
-  static void as_quoted_ascii(const char* utf8_str, char* buf, int buflen);
+  static void as_quoted_ascii(const char* utf8_str, int utf8_length, char* buf, int buflen);
 
   // converts a quoted ascii string to utf8 string.  returns the original
   // string unchanged if nothing needs to be done.