mirror of https://github.com/apache/poi.git
Bug 66425: Avoid exceptions found via poi-fuzz
Change an assertion which can be triggered via an input-document. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63309 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914403 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f1589b8d66
commit
c7329fbd38
|
@ -88,7 +88,9 @@ public class PICFAndOfficeArtData {
|
||||||
|
|
||||||
// [MS-ODRAW] allows for multiple records in a OfficeArtInlineSpContainer, which is what we're parsing here.
|
// [MS-ODRAW] allows for multiple records in a OfficeArtInlineSpContainer, which is what we're parsing here.
|
||||||
// However, in the context of a HWPF document, there should be only 1.
|
// However, in the context of a HWPF document, there should be only 1.
|
||||||
assert _blipRecords.size() == 1;
|
if (_blipRecords.size() != 1) {
|
||||||
|
throw new IllegalStateException("Should only have one BLIP-Record, but had: " + _blipRecords.size());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,8 @@ public class TestWordToConverterSuite {
|
||||||
"TestHPSFWritingFunctionality.doc",
|
"TestHPSFWritingFunctionality.doc",
|
||||||
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-4947285593948160.doc",
|
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-4947285593948160.doc",
|
||||||
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-5440721166139392.doc",
|
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-5440721166139392.doc",
|
||||||
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-5050208641482752.doc"
|
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-5050208641482752.doc",
|
||||||
|
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-4892412469968896.doc"
|
||||||
);
|
);
|
||||||
|
|
||||||
public static Stream<Arguments> files() {
|
public static Stream<Arguments> files() {
|
||||||
|
|
|
@ -53,7 +53,8 @@ public class TestWordToTextConverter {
|
||||||
"TestHPSFWritingFunctionality.doc",
|
"TestHPSFWritingFunctionality.doc",
|
||||||
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-4947285593948160.doc",
|
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-4947285593948160.doc",
|
||||||
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-5440721166139392.doc",
|
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-5440721166139392.doc",
|
||||||
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-5050208641482752.doc"
|
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-5050208641482752.doc",
|
||||||
|
"clusterfuzz-testcase-minimized-POIHWPFFuzzer-4892412469968896.doc"
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue