8158168: Missing bounds checks for some String intrinsics

Reviewed-by: vlivanov, thartmann, sherman
This commit is contained in:
Dean Long 2017-04-12 16:37:33 -04:00
parent 456c8e0846
commit 73551c45ef
7 changed files with 417 additions and 254 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2017, 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
@ -293,7 +293,7 @@ final class StringConcatHelper {
if (coder == String.LATIN1) {
return Integer.getChars(value, index, buf);
} else {
return Integer.getCharsUTF16(value, index, buf);
return StringUTF16.getChars(value, index, buf);
}
}
@ -311,7 +311,7 @@ final class StringConcatHelper {
if (coder == String.LATIN1) {
return Long.getChars(value, index, buf);
} else {
return Long.getCharsUTF16(value, index, buf);
return StringUTF16.getChars(value, index, buf);
}
}