mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 04:54:04 -08:00
Tiny NPE fix
git-svn-id: https://zxing.googlecode.com/svn/trunk@1352 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
74c8744e8c
commit
0e0bed8b50
|
@ -282,8 +282,11 @@ public final class DecodeServlet extends HttpServlet {
|
|||
response.sendRedirect("badimage.jspx");
|
||||
return;
|
||||
}
|
||||
if (image == null ||
|
||||
image.getHeight() <= 1 || image.getWidth() <= 1 ||
|
||||
if (image == null) {
|
||||
response.sendRedirect("badimage.jspx");
|
||||
return;
|
||||
}
|
||||
if (image.getHeight() <= 1 || image.getWidth() <= 1 ||
|
||||
image.getHeight() * image.getWidth() > MAX_PIXELS) {
|
||||
log.fine("Dimensions too large: " + image.getWidth() + 'x' + image.getHeight());
|
||||
response.sendRedirect("badimage.jspx");
|
||||
|
|
Loading…
Reference in a new issue