diff options
author | Dominik Stadler <centic@apache.org> | 2016-01-18 20:16:23 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2016-01-18 20:16:23 +0000 |
commit | 8a2ce9d9dfdfeab33aa38b06011c41fb56272843 (patch) | |
tree | 7d234cc6fda12c661acb690bdc4d8abb8dba51cd | |
parent | 5fd6d81f7da6b0f8fe877a824f4b4c2f08e183c2 (diff) | |
download | poi-8a2ce9d9dfdfeab33aa38b06011c41fb56272843.tar.gz poi-8a2ce9d9dfdfeab33aa38b06011c41fb56272843.zip |
Fix possible NPE found with msg-file from CommonCrawl
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1725334 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/scratchpad/src/org/apache/poi/hsmf/extractor/OutlookTextExtactor.java | 2 | ||||
-rwxr-xr-x | test-data/hsmf/logsat.com_signatures_valid.msg | bin | 0 -> 23040 bytes |
2 files changed, 1 insertions, 1 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hsmf/extractor/OutlookTextExtactor.java b/src/scratchpad/src/org/apache/poi/hsmf/extractor/OutlookTextExtactor.java index be396f3b00..0d949dff56 100644 --- a/src/scratchpad/src/org/apache/poi/hsmf/extractor/OutlookTextExtactor.java +++ b/src/scratchpad/src/org/apache/poi/hsmf/extractor/OutlookTextExtactor.java @@ -153,7 +153,7 @@ public class OutlookTextExtactor extends POIOLE2TextExtractor { for(AttachmentChunks att : msg.getAttachmentFiles()) { StringChunk name = att.attachLongFileName; if (name == null) name = att.attachFileName; - String attName = name.getValue(); + String attName = name == null ? null : name.getValue(); if(att.attachMimeTag != null && att.attachMimeTag.getValue() != null) { diff --git a/test-data/hsmf/logsat.com_signatures_valid.msg b/test-data/hsmf/logsat.com_signatures_valid.msg Binary files differnew file mode 100755 index 0000000000..a074325109 --- /dev/null +++ b/test-data/hsmf/logsat.com_signatures_valid.msg |