This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/2.x by this push:
new 81f1591 TIKA-2285 -- triggering file didn't actually trigger
string index out of bounds exception, but there could be one with a null or
very short styleName
81f1591 is described below
commit 81f1591fe4c5f4d61ebdb3bacd3867fe308576cc
Author: tballison <[email protected]>
AuthorDate: Wed Mar 1 09:50:16 2017 -0500
TIKA-2285 -- triggering file didn't actually trigger string index out of
bounds exception, but there could be one with a null or very short styleName
---
.../main/java/org/apache/tika/parser/microsoft/WordExtractor.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/WordExtractor.java
b/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/WordExtractor.java
index a3664c1..ad4c16c 100644
---
a/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/WordExtractor.java
+++
b/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/WordExtractor.java
@@ -108,6 +108,11 @@ public class WordExtractor extends AbstractPOIFSExtractor {
* what style should be applied to it.
*/
public static TagAndStyle buildParagraphTagAndStyle(String styleName,
boolean isTable) {
+
+ if (styleName == null || styleName.length() < 2) {
+ return defaultParagraphStyle;
+ }
+
TagAndStyle tagAndStyle = fixedParagraphStyles.get(styleName);
if (tagAndStyle != null) {
return tagAndStyle;
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].