提交 5fcc02f7 编写于 作者: B bae

6874643: ImageI/O JPEG is vulnerable to Heap Overflow

Reviewed-by: prr, hawtin
上级 5e8e7751
...@@ -1833,6 +1833,13 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage ...@@ -1833,6 +1833,13 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage
return JNI_FALSE; 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 * 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. * so we don't have to worry about pinning and unpinning it again.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册