mirror of
https://github.com/zxing/zxing.git
synced 2025-02-21 02:55:27 -08:00
Probable fix for AIOOBE from https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43765
This commit is contained in:
parent
037efb0c28
commit
10d6b08fc6
|
@ -301,7 +301,7 @@ public final class Detector {
|
|||
}
|
||||
|
||||
private boolean isValid(ResultPoint p) {
|
||||
return p.getX() >= 0 && p.getX() < image.getWidth() && p.getY() > 0 && p.getY() < image.getHeight();
|
||||
return p.getX() >= 0 && p.getX() <= image.getWidth() - 1 && p.getY() > 0 && p.getY() <= image.getHeight() - 1;
|
||||
}
|
||||
|
||||
private static BitMatrix sampleGrid(BitMatrix image,
|
||||
|
|
Loading…
Reference in a new issue