--- a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c Sat Sep 05 07:55:05 2009 -0700
+++ b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c Thu Sep 10 12:26:34 2009 +0400
@@ -1833,6 +1833,13 @@
return JNI_FALSE;
}
+ if (stepX > cinfo->image_width) {
+ stepX = cinfo->image_width;
+ }
+ if (stepY > cinfo->image_height) {
+ stepY = cinfo->image_height;
+ }
+
/*
* First get the source bands array and copy it to our local array
* so we don't have to worry about pinning and unpinning it again.