Skip to content

Commit

Permalink
fix AddressSanitizer issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Zilong-Li committed Apr 7, 2024
1 parent 80b2285 commit 3145ff3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: vcfppR
Title: Rapid Manipulation of the Variant Call Format (VCF)
Version: 0.4.3
Version: 0.4.4
Authors@R: c(
person("Zilong", "Li", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-5859-2078")),
Expand Down
5 changes: 3 additions & 2 deletions cleanup.win
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh

rm -f src/htslib-1.18/config.h src/*.o src/*.so src/*.dll src/*.dylib
cd src/htslib-1.18/ && make clean && cd -
HTSLIB_DIR=htslib-1.19.1
rm -f src/${HTSLIB_DIR}/config.h src/*.o src/*.so src/*.dll src/*.dylib
cd src/${HTSLIB_DIR}/ && make clean && cd -
2 changes: 1 addition & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
HTSLIB_DIR=htslib-1.18
HTSLIB_DIR=htslib-1.19.1
PKG_CPPFLAGS=-I. -I${HTSLIB_DIR} -D_FILE_OFFSET_BITS=64
PKG_LIBS=${HTSLIB_DIR}/libhts.a

Expand Down
1 change: 1 addition & 0 deletions src/vcfpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1582,6 +1582,7 @@ class BcfWriter
str.push_back('\0'); // don't forget string has no \0;
kstring_t s = {vcfline.length(), vcfline.length(), &str[0]}; // kstring
ret = vcf_parse1(&s, header.hdr, b.get());
free(s.s);
if(ret < 0) hts_log_debug("the ret is %i ", ret);
if(ret < 0) throw std::runtime_error("error parsing: " + vcfline + "\n");
if(b->errcode == BCF_ERR_CTG_UNDEF)
Expand Down

0 comments on commit 3145ff3

Please sign in to comment.