Skip to content

Commit

Permalink
fixed a segfault when there are too few good bases.
Browse files Browse the repository at this point in the history
  • Loading branch information
Heng Li committed Nov 18, 2011
1 parent c8edcaf commit 8f89f55
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions bntseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <stdlib.h>
#include <string.h>
#include <zlib.h>
#include <unistd.h>
#include "bntseq.h"
#include "main.h"
#include "utils.h"
Expand Down
2 changes: 1 addition & 1 deletion bwtsw2_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ static void bsw2_aln_core(bsw2seq_t *_seq, const bsw2opt_t *_opt, const bntseq_t
rseq[1][i] = c;
}
if (l - k < opt.t) { // too few unambiguous bases
buf[x] = 0;
buf[x] = calloc(1, sizeof(bwtsw2_t));
free(seq[0]); continue;
}
// alignment
Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "utils.h"

#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "0.6.0-r85"
#define PACKAGE_VERSION "0.6.0-r89-dev"
#endif

static int usage()
Expand Down

0 comments on commit 8f89f55

Please sign in to comment.