Skip to content

Commit

Permalink
Fix incorrect offset into fastq header in name2 mode
Browse files Browse the repository at this point in the history
The offset to skip over the first name in the fastq header
was being applied twice, potentially causing the search for
the comment part to fall off the end of the allocated string.

Thanks to John Marshall for reporting this.
  • Loading branch information
daviesrob authored and whitwham committed Sep 28, 2021
1 parent ab22e84 commit f05aff6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sam.c
Original file line number Diff line number Diff line change
Expand Up @@ -3735,7 +3735,7 @@ static int fastq_parse1(htsFile *fp, bam1_t *b) {
}

l = x->name.l;
char *s = x->name.s + i;
char *s = x->name.s;
while (i < l && !isspace_c(s[i]))
i++;
if (i < l) {
Expand Down

0 comments on commit f05aff6

Please sign in to comment.