CsvReader.ReadNextRecord throws IndexOutOfRangeException
Metalnem opened this issue · 2 comments
Metalnem commented
CsvReader.ReadNextRecord throws an IndexOutOfRangeException when reading the file from the attached archive. You can run the following code to reproduce it (the path variable should contain the path to the extracted file):
using (var file = File.OpenText(path))
using (var csv = new CsvReader(file, false))
{
while (csv.ReadNextRecord()) { }
}
Found via SharpFuzz.
fretje commented
Metalnem commented
I was trying to determine if the ReadNextRecord always throws MalformedCsvException on malformed CSV inputs, and I discovered that it can sometimes throw IndexOutOfRangeException. This binary file is just one of several inputs that I managed to generate.