diff options
author | Javen O'Neal <onealj@apache.org> | 2016-07-15 06:12:37 +0000 |
---|---|---|
committer | Javen O'Neal <onealj@apache.org> | 2016-07-15 06:12:37 +0000 |
commit | dee56fc6c06fbc29c25bf14682a306f7f9362b60 (patch) | |
tree | 86327d28685ad75fc4b119737c81d670d95dd5f6 /src/java/org/apache | |
parent | 416641d986180547c5b6d2b299ed9f0b6a03dfa7 (diff) | |
download | poi-dee56fc6c06fbc29c25bf14682a306f7f9362b60.tar.gz poi-dee56fc6c06fbc29c25bf14682a306f7f9362b60.zip |
bug 59858: describe why VBA macro reading failed
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1752778 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r-- | src/java/org/apache/poi/poifs/macros/VBAMacroReader.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/poifs/macros/VBAMacroReader.java b/src/java/org/apache/poi/poifs/macros/VBAMacroReader.java index b221d3e39f..66ebab97dc 100644 --- a/src/java/org/apache/poi/poifs/macros/VBAMacroReader.java +++ b/src/java/org/apache/poi/poifs/macros/VBAMacroReader.java @@ -218,6 +218,10 @@ public class VBAMacroReader implements Closeable { modules.put(name, module); module.read(dis); } else { + if (module.offset == null) { + //This should not happen. bug 59858 + throw new IOException("Module offset for '" + name + "' was never read."); + } // we know the offset already, so decompress immediately on-the-fly long skippedBytes = dis.skip(module.offset); if (skippedBytes != module.offset) { |