diff --git a/main/HSSF/Record/TextObjectRecord.cs b/main/HSSF/Record/TextObjectRecord.cs index a5594b3f3..f1958ceed 100644 --- a/main/HSSF/Record/TextObjectRecord.cs +++ b/main/HSSF/Record/TextObjectRecord.cs @@ -94,6 +94,9 @@ public TextObjectRecord(RecordInputStream in1) throw new RecordFormatException("Read " + ptgs.Length + " tokens but expected exactly 1"); } + if(!(ptgs[0] is OperandPtg)) { + throw new ArgumentException("Had unexpected type of ptg at index 0: " + ptgs[0].GetType()); + } _linkRefPtg = (OperandPtg)ptgs[0]; if (in1.Remaining > 0) { diff --git a/testcases/ooxml/SS/Converter/TestExcelToHtmlConverterSuite.cs b/testcases/ooxml/SS/Converter/TestExcelToHtmlConverterSuite.cs index 91c607418..40834c8e8 100644 --- a/testcases/ooxml/SS/Converter/TestExcelToHtmlConverterSuite.cs +++ b/testcases/ooxml/SS/Converter/TestExcelToHtmlConverterSuite.cs @@ -14,7 +14,7 @@ public class TestExcelToHtmlConverterSuite private static List failingFiles = new List(); [Test] - [Ignore("test")] + public void TestExcelToHtmlConverter() { string[] fileNames = POIDataSamples.GetSpreadSheetInstance().GetFiles("*.xls"); @@ -22,7 +22,7 @@ public void TestExcelToHtmlConverter() StringBuilder stringBuilder = new StringBuilder(); foreach (string filename in fileNames) { - if (filename.EndsWith(".xls")) + if (filename.EndsWith("clusterfuzz-testcase-minimized-POIHSSFFuzzer-6322470200934400.xls")) toConverter.Add(filename); else continue; diff --git a/testcases/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-6322470200934400.xls b/testcases/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-6322470200934400.xls new file mode 100644 index 000000000..40f4ecaea Binary files /dev/null and b/testcases/test-data/spreadsheet/clusterfuzz-testcase-minimized-POIHSSFFuzzer-6322470200934400.xls differ