Segmentation fault when maq fakemut
Status: Beta
Brought to you by:
lh3lh3
When the sequence is very short, which makes no mutation, maq will crash with segmentation fault. For example:
$ echo -e ">test\nACTG" | ./maq fakemut -
>test
Segmentation fault
Modifying the fasta2bfa.c could fix the bug:
$ cat fasta2bfa.c.patch
87c87
< if (i == mutarray[cur_mut].pos) {
---
> if (mutarray && i == mutarray[cur_mut].pos) {