Index: modules/awt/src/main/java/common/java/awt/image/ComponentSampleModel.java =================================================================== --- modules/awt/src/main/java/common/java/awt/image/ComponentSampleModel.java (revision 474775) +++ modules/awt/src/main/java/common/java/awt/image/ComponentSampleModel.java (working copy) @@ -106,6 +106,10 @@ @Override public Object getDataElements(int x, int y, Object obj, DataBuffer data) { + if (x < 0 || y < 0 || x >= this.width || y >= this.height) { + // awt.63=Coordinates are not in bounds + throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$ + } switch (dataType) { case DataBuffer.TYPE_BYTE: byte bdata[]; @@ -189,6 +193,10 @@ @Override public void setDataElements(int x, int y, Object obj, DataBuffer data) { + if (x < 0 || y < 0 || x >= this.width || y >= this.height) { + // awt.63=Coordinates are not in bounds + throw new ArrayIndexOutOfBoundsException(Messages.getString("awt.63")); //$NON-NLS-1$ + } switch (dataType) { case DataBuffer.TYPE_BYTE: byte barr[] = (byte[]) obj;