mirror of
https://github.com/apache/poi.git
synced 2026-02-27 12:30:08 +08:00
Avoid NPE with malformed EscherAggregate
This commit is contained in:
parent
55c1608a2d
commit
e96c9e17c0
@ -292,6 +292,9 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
|
||||
|
||||
// Write the matching OBJ record
|
||||
Record obj = shapeToObj.get(shapes.get(i));
|
||||
if (obj == null) {
|
||||
throw new IllegalStateException("Cannot serialize EscherAggregate with missing shape-object");
|
||||
}
|
||||
pos += obj.serialize(pos, data);
|
||||
|
||||
isFirst = false;
|
||||
|
||||
@ -49,6 +49,7 @@ class TestBiffViewer extends BaseTestIteratingXLS {
|
||||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-6483562584932352.xls", IndexOutOfBoundsException.class);
|
||||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-5816431116615680.xls", RecordFormatException.class);
|
||||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-4734163573080064.xls", IndexOutOfBoundsException.class);
|
||||
excludes.put("cf9f845e73447b092477d0472402a5baea4b8c9f.xls", RecordFormatException.class);
|
||||
|
||||
return excludes;
|
||||
}
|
||||
|
||||
@ -52,6 +52,7 @@ class TestRecordLister extends BaseTestIteratingXLS {
|
||||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-6483562584932352.xls", RecordFormatException.class);
|
||||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-5816431116615680.xls", RecordFormatException.class);
|
||||
excludes.put("clusterfuzz-testcase-minimized-POIHSSFFuzzer-4734163573080064.xls", IndexOutOfBoundsException.class);
|
||||
excludes.put("cf9f845e73447b092477d0472402a5baea4b8c9f.xls", RecordFormatException.class);
|
||||
|
||||
return excludes;
|
||||
}
|
||||
|
||||
@ -138,7 +138,8 @@ class TestDrawingAggregate {
|
||||
filter(file ->
|
||||
!file.getName().equals("clusterfuzz-testcase-minimized-POIHSSFFuzzer-5285517825277952.xls") &&
|
||||
!file.getName().equals("clusterfuzz-testcase-minimized-POIHSSFFuzzer-4977868385681408.xls") &&
|
||||
!file.getName().equals("crash-e329fca9087fe21bca4a80c8bc472a661c98d860.xls")).
|
||||
!file.getName().equals("crash-e329fca9087fe21bca4a80c8bc472a661c98d860.xls") &&
|
||||
!file.getName().equals("cf9f845e73447b092477d0472402a5baea4b8c9f.xls")).
|
||||
map(Arguments::of);
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user