Skip to content
Permalink
Browse files

r1198: exit if .alt is malformatted

Resolves #232
  • Loading branch information...
lh3 committed Jan 23, 2019
1 parent f090f93 commit 20d0a13092aa4cb73230492b05f9697d5ef0b88e
Showing with 8 additions and 2 deletions.
  1. +7 −1 bntseq.c
  2. +1 −1 main.c
@@ -197,7 +197,13 @@ bntseq_t *bns_restore(const char *prefix)
}
while (c != '\n' && c != EOF) c = fgetc(fp);
i = 0;
} else str[i++] = c; // FIXME: potential segfault here
} else {
if (i >= 1022) {
fprintf(stderr, "[E::%s] sequence name longer than 1023 characters. Abort!\n", __func__);
exit(1);
}
str[i++] = c;
}
}
kh_destroy(str, h);
fclose(fp);
2 main.c
@@ -4,7 +4,7 @@
#include "utils.h"

#ifndef PACKAGE_VERSION
#define PACKAGE_VERSION "0.7.17-r1194-dirty"
#define PACKAGE_VERSION "0.7.17-r1198-dirty"
#endif

int bwa_fa2pac(int argc, char *argv[]);

0 comments on commit 20d0a13

Please sign in to comment.
You can’t perform that action at this time.