mirror of https://github.com/apache/poi.git
Bug 66425: Avoid a NullPointerException found via oss-fuzz
We try to avoid throwing NullPointerException, but it was possible to trigger one here with a specially crafted input-file Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=61520 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911863 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fd29772be6
commit
0654bf9d87
|
@ -233,7 +233,7 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Sort out headers and footers
|
// Sort out headers and footers
|
||||||
if (doc.getDocument().getBody().getSectPr() != null) {
|
if (doc.getDocument().getBody() != null && doc.getDocument().getBody().getSectPr() != null) {
|
||||||
headerFooterPolicy = new XWPFHeaderFooterPolicy(this);
|
headerFooterPolicy = new XWPFHeaderFooterPolicy(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue