poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From max...@apache.org
Subject svn commit: r1058176 - /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
Date Wed, 12 Jan 2011 15:16:50 GMT
Author: maxcom
Date: Wed Jan 12 15:16:50 2011
New Revision: 1058176

URL: http://svn.apache.org/viewvc?rev=1058176&view=rev
Log:
hwpf: fix ArrayIndexOutOfBoundsException in Range.getCharacterRun() (TIKA-577)

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java?rev=1058176&r1=1058175&r2=1058176&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java Wed Jan 12 15:16:50
2011
@@ -791,6 +791,11 @@ public class Range { // TODO -instantiab
 
 		int[] point = findRange(_paragraphs, _parStart, Math.max(chpx.getStart(), _start), chpx
 				.getEnd());
+
+        if (point[0] >= _paragraphs.size()) {
+            return null;
+        }
+
 		PAPX papx = _paragraphs.get(point[0]);
 		short istd = papx.getIstd();
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message