--- old/src/share/classes/sun/awt/image/ByteComponentRaster.java 2014-03-26 21:26:52.223725400 +0400 +++ new/src/share/classes/sun/awt/image/ByteComponentRaster.java 2014-03-26 21:26:51.631150100 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, 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 @@ -888,7 +888,7 @@ // we can be sure that width and height are greater than 0 if (scanlineStride < 0 || scanlineStride > (Integer.MAX_VALUE / height) || - scanlineStride > data.length) + (height > 1 && scanlineStride > data.length)) { // integer overflow throw new RasterFormatException("Incorrect scanline stride: "