From: PJ Fanning Date: Tue, 18 Dec 2018 23:26:49 +0000 (+0000) Subject: fix index check in HemfDraw X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c5ca61e34b41ac16d811d60de2315560357c1ed5;p=poi.git fix index check in HemfDraw git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1849250 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/scratchpad/src/org/apache/poi/hemf/record/emf/HemfDraw.java b/src/scratchpad/src/org/apache/poi/hemf/record/emf/HemfDraw.java index 2eae698b16..327e1be57f 100644 --- a/src/scratchpad/src/org/apache/poi/hemf/record/emf/HemfDraw.java +++ b/src/scratchpad/src/org/apache/poi/hemf/record/emf/HemfDraw.java @@ -783,7 +783,7 @@ public class HemfDraw { int mode2 = leis.readUByte(); int mode3 = leis.readUByte(); assert(mode2 == 0x04 && (mode3 == 0x04 || mode3 == 0x05)); - if ((i + 2) > points.length) { + if ((i + 2) >= points.length) { throw new IllegalStateException("Points index causes index out of bounds"); } poly.curveTo(