--- old/src/share/classes/sun/awt/image/BytePackedRaster.java 2014-03-26 21:26:55.922195000 +0400 +++ new/src/share/classes/sun/awt/image/BytePackedRaster.java 2014-03-26 21:26:55.327119500 +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 @@ -1388,7 +1388,7 @@ if (scanlineStride < 0 || scanlineStride > (Integer.MAX_VALUE / height) || - scanlineStride > data.length) + (height > 1 && scanlineStride > data.length)) { throw new RasterFormatException("Invalid scanline stride"); }