This is an automated email from the git hooks/post-receive script. tille pushed a commit to branch master in repository htslib.
commit 27395580420c1e59247460d44d8b96c9d6ccf92d Author: James Bonfield <[email protected]> Date: Wed Jun 21 15:13:43 2017 +0100 Trivial fix for reading empty cram indices. Fixes #556 --- cram/cram_index.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cram/cram_index.c b/cram/cram_index.c index 53f1788..90d7bea 100644 --- a/cram/cram_index.c +++ b/cram/cram_index.c @@ -208,7 +208,7 @@ int cram_index_load(cram_fd *fd, const char *fn, const char *fn_idx) { // Parse it line at a time - do { + while (pos < kstr.l) { /* 1.1 layout */ if (kget_int32(&kstr, &pos, &e.refid) == -1) goto fail; @@ -292,7 +292,7 @@ int cram_index_load(cram_fd *fd, const char *fn, const char *fn_idx) { while (pos < kstr.l && kstr.s[pos] != '\n') pos++; pos++; - } while (pos < kstr.l); + } free(idx_stack); free(kstr.s); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/htslib.git _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
