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=61644 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911842 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5a4193b14d
commit
1b88529d07
|
@ -57,8 +57,10 @@ public abstract class XWPFAbstractFootnotesEndnotes extends POIXMLDocumentPart {
|
|||
|
||||
public XWPFAbstractFootnoteEndnote getFootnoteById(int id) {
|
||||
for (XWPFAbstractFootnoteEndnote note : listFootnote) {
|
||||
if (note.getCTFtnEdn().getId().intValue() == id)
|
||||
if (note.getCTFtnEdn().getId() != null &&
|
||||
note.getCTFtnEdn().getId().intValue() == id) {
|
||||
return note;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue