mirror of https://github.com/apache/poi.git
lgtm issues: potential index out of bounds exceptions
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1849127 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d1400559f8
commit
1aeadee8c4
|
@ -783,6 +783,9 @@ public class HemfDraw {
|
|||
int mode2 = leis.readUByte();
|
||||
int mode3 = leis.readUByte();
|
||||
assert(mode2 == 0x04 && (mode3 == 0x04 || mode3 == 0x05));
|
||||
if ((i + 2) > points.length) {
|
||||
throw new IllegalStateException("Points index causes index out of bounds");
|
||||
}
|
||||
poly.curveTo(
|
||||
points[i].getX(), points[i].getY(),
|
||||
points[i+1].getX(), points[i+1].getY(),
|
||||
|
|
Loading…
Reference in New Issue