mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-29 04:28:30 +00:00
8225292: Better Graphics2D drawing
Reviewed-by: serb, psadhukhan, mschoene, rhalade
This commit is contained in:
parent
c2701f73d5
commit
267eae16ae
@ -3021,7 +3021,8 @@ public final class SunGraphics2D
|
||||
if (data == null) {
|
||||
throw new NullPointerException("char data is null");
|
||||
}
|
||||
if (offset < 0 || length < 0 || offset + length > data.length) {
|
||||
if (offset < 0 || length < 0 || offset + length < length ||
|
||||
offset + length > data.length) {
|
||||
throw new ArrayIndexOutOfBoundsException("bad offset/length");
|
||||
}
|
||||
if (font.hasLayoutAttributes()) {
|
||||
@ -3053,7 +3054,8 @@ public final class SunGraphics2D
|
||||
if (data == null) {
|
||||
throw new NullPointerException("byte data is null");
|
||||
}
|
||||
if (offset < 0 || length < 0 || offset + length > data.length) {
|
||||
if (offset < 0 || length < 0 || offset + length < length ||
|
||||
offset + length > data.length) {
|
||||
throw new ArrayIndexOutOfBoundsException("bad offset/length");
|
||||
}
|
||||
/* Byte data is interpreted as 8-bit ASCII. Re-use drawChars loops */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user