mirror of https://github.com/apache/poi.git
Bug 66425: Avoid exceptions found via poi-fuzz
Prevent a NullPointerException Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65448 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917175 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8c101982e0
commit
d4bcc2b3bb
|
@ -127,8 +127,11 @@ public class XWPFFootnotes extends XWPFAbstractFootnotesEndnotes {
|
|||
XmlOptions xmlOptions = new XmlOptions(DEFAULT_XML_OPTIONS);
|
||||
xmlOptions.setSaveSyntheticDocumentElement(new QName(CTFootnotes.type.getName().getNamespaceURI(), "footnotes"));
|
||||
PackagePart part = getPackagePart();
|
||||
try (OutputStream out = part.getOutputStream()) {
|
||||
ctFootnotes.save(out, xmlOptions);
|
||||
|
||||
if (ctFootnotes != null) {
|
||||
try (OutputStream out = part.getOutputStream()) {
|
||||
ctFootnotes.save(out, xmlOptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue