Issue 735 commit user patch for AAIOBE

git-svn-id: https://zxing.googlecode.com/svn/trunk@1723 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2011-03-06 19:23:15 +00:00
parent 0aeafb7fbd
commit 9e8fb1e2ff

View file

@ -118,6 +118,10 @@ public class QRCodeReader implements Reader {
if (matrixWidth == 0 || matrixHeight == 0) {
throw NotFoundException.getNotFoundInstance();
}
if (matrixHeight != matrixWidth) {
// Only possibly decode square regions
throw NotFoundException.getNotFoundInstance();
}
// Push in the "border" by half the module width so that we start
// sampling in the middle of the module. Just in case the image is a