cmars/pystdf — pull request #1 by gitfoxi (2014-08-19 22:45:23+00:00)
Title: Recover from a broken Cn

This works around someone else's bug where they write a Cn that is longer than 255 bytes. They actually write the long string but the U1 with the length overflows to some smaller number. Since the parser actually does the read operations, some data from the record is left unread and subsequent reads see garbage.

I think a better approach is to read each record's REC_LEN bytes first and have the parsers work on that data but the parser is very complicated and I wouldn't know where to begin making that change.