mirror of https://github.com/apache/poi.git
Bug 66425: Avoid NullPointerExceptions found via poi-fuzz
We try to avoid throwing NullPointerException, but it was possible to trigger one here git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912303 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cc4ccbae1d
commit
e9b860f6d4
|
@ -1430,8 +1430,9 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun {
|
||||||
}
|
}
|
||||||
if (o instanceof CTFtnEdnRef) {
|
if (o instanceof CTFtnEdnRef) {
|
||||||
CTFtnEdnRef ftn = (CTFtnEdnRef) o;
|
CTFtnEdnRef ftn = (CTFtnEdnRef) o;
|
||||||
|
final int i = ftn.getId() == null ? -1 : ftn.getId().intValue();
|
||||||
String footnoteRef = ftn.getDomNode().getLocalName().equals("footnoteReference") ?
|
String footnoteRef = ftn.getDomNode().getLocalName().equals("footnoteReference") ?
|
||||||
"[footnoteRef:" + ftn.getId().intValue() + "]" : "[endnoteRef:" + ftn.getId().intValue() + "]";
|
"[footnoteRef:" + i + "]" : "[endnoteRef:" + i + "]";
|
||||||
text.append(footnoteRef);
|
text.append(footnoteRef);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue