Strengthen check for bad dimension

git-svn-id: https://zxing.googlecode.com/svn/trunk@1845 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2011-07-01 07:48:08 +00:00
parent 4e9c7e16c0
commit 61c3e38802

View file

@ -100,7 +100,7 @@ public final class PDF417Reader implements Reader {
int matrixWidth = (right - left + 1) / moduleSize;
int matrixHeight = (bottom - top + 1) / moduleSize;
if (matrixWidth == 0 || matrixHeight == 0) {
if (matrixWidth <= 0 || matrixHeight <= 0) {
throw NotFoundException.getNotFoundInstance();
}