7018912: [parfait] potential buffer overruns in imageio jpeg
Reviewed-by: jgodinez, prr
--- a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c Wed Feb 16 15:58:28 2011 -0800
+++ b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c Thu Feb 17 13:42:26 2011 +0300
@@ -1846,7 +1846,7 @@
cinfo = (j_decompress_ptr) data->jpegObj;
- if ((numBands < 1) ||
+ if ((numBands < 1) || (numBands > MAX_BANDS) ||
(sourceXStart < 0) || (sourceXStart >= (jint)cinfo->image_width) ||
(sourceYStart < 0) || (sourceYStart >= (jint)cinfo->image_height) ||
(sourceWidth < 1) || (sourceWidth > (jint)cinfo->image_width) ||