Bug 66425: Avoid exceptions found via poi-fuzz

Prevent a NullPointerException

Fixes https://issues.oss-fuzz.com/issues/42538163

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1923058 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2025-01-11 09:24:03 +00:00
parent f873888301
commit edcbd87360
3 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ public class XSLFGraphicFrame extends XSLFShape implements GraphicalFrame<XSLFSh
} }
CTPoint2D off = xfrm.getOff(); CTPoint2D off = xfrm.getOff();
if (off == null) { if (off == null || off.getX() == null || off.getY() == null) {
throw new IllegalArgumentException("Could not retrieve Off from the XML object"); throw new IllegalArgumentException("Could not retrieve Off from the XML object");
} }
double x = Units.toPoints(POIXMLUnits.parseLength(off.xgetX())); double x = Units.toPoints(POIXMLUnits.parseLength(off.xgetX()));

Binary file not shown.