Closed jkbonfield closed 1 year ago
Note I did also wonder about changing the (ret = ...) < -1
condition to < 0
so a blank sequence is an error, but technically we do support empty sequences in FASTA.
Adittedly this is specifically the case of the last sequence being empty (which then triggers a bug if it also happens to be the first so hts_getline
hasn't yet allocated a buffer), but if we accept empty sequences in FASTA elsewhere then I guess we should accept them at the end too. Not sure if that's good or bad, but this fix is consistent in that behaviour at least.
Eg the minimal file of:
Credit to OSS-Fuzz Fixes oss-fuzz 51378