From 7df834cf16021cacf70f915669da5e0645e5ead4 Mon Sep 17 00:00:00 2001 From: John Marshall Date: Tue, 26 May 2026 23:39:54 +1200 Subject: [PATCH 1/3] Use isalpha_c() wrapper Signed-off-by: John Marshall --- sam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sam.c b/sam.c index 09067fbb7..844b25fcd 100644 --- a/sam.c +++ b/sam.c @@ -3861,7 +3861,7 @@ int fastq_state_set(samFile *fp, enum hts_fmt_option opt, ...) { bc = "RX"; int ntags = 0, err = 0; for (ntags = 0; *bc && ntags < UMI_TAGS; ntags++) { - if (!isalpha(bc[0]) || !isalnum_c(bc[1])) { + if (!isalpha_c(bc[0]) || !isalnum_c(bc[1])) { err = 1; break; } From 6b12ae5980217e08b3cb2528e321a67d1b029c82 Mon Sep 17 00:00:00 2001 From: John Marshall Date: Sat, 13 Jun 2026 20:29:18 +1200 Subject: [PATCH 2/3] Add missing Makefile dependencies [minor] Signed-off-by: John Marshall --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8125d3aaa..378ab20cb 100644 --- a/Makefile +++ b/Makefile @@ -527,7 +527,7 @@ realn.o realn.pico: realn.c config.h $(htslib_hts_h) $(htslib_hts_alloc_h) $(hts textutils.o textutils.pico: textutils.c config.h $(htslib_hfile_h) $(htslib_kstring_h) $(htslib_sam_h) $(hts_internal_h) cram/cram_codecs.o cram/cram_codecs.pico: cram/cram_codecs.c config.h $(fuzz_settings_h) $(htslib_hts_alloc_h) $(htslib_hts_endian_h) $(htscodecs_varint_h) $(htscodecs_pack_h) $(htscodecs_rle_h) $(cram_h) -cram/cram_decode.o cram/cram_decode.pico: cram/cram_decode.c config.h $(cram_h) $(cram_os_h) $(htslib_hts_h) $(htslib_hts_alloc_h) $(htslib_hfile_h) +cram/cram_decode.o cram/cram_decode.pico: cram/cram_decode.c config.h $(cram_h) $(cram_os_h) $(htslib_hts_h) $(htslib_hts_alloc_h) $(htslib_hfile_h) $(sam_internal_h) cram/cram_encode.o cram/cram_encode.pico: cram/cram_encode.c config.h $(cram_h) $(cram_os_h) $(sam_internal_h) $(htslib_hts_h) $(htslib_hts_alloc_h) $(htslib_hts_endian_h) $(textutils_internal_h) cram/cram_external.o cram/cram_external.pico: cram/cram_external.c config.h $(htscodecs_rANS_static4x16_h) $(htslib_hfile_h) $(htslib_hts_alloc_h) $(cram_h) cram/cram_index.o cram/cram_index.pico: cram/cram_index.c config.h $(htslib_bgzf_h) $(htslib_hfile_h) $(htslib_hts_alloc_h) $(hts_internal_h) $(cram_h) $(cram_os_h) @@ -900,7 +900,7 @@ test/test-bcf-sr.o: test/test-bcf-sr.c config.h $(htslib_hts_alloc_h) $(htslib_h test/test-bcf-translate.o: test/test-bcf-translate.c config.h $(htslib_vcf_h) test/test_introspection.o: test/test_introspection.c config.h $(htslib_hts_h) $(htslib_hfile_h) test/test-bcf_set_variant_type.o: test/test-bcf_set_variant_type.c config.h $(htslib_hts_h) vcf.c -test/test_hfile_libcurl.o: test/test_hfile_libcurl.c config.h $(htslib_hfile_h) $(htslib_hts_h) +test/test_hfile_libcurl.o: test/test_hfile_libcurl.c config.h $(htslib_hfile_h) $(htslib_hts_h) $(hts_internal_h) # Standalone target not added to $(BUILT_TEST_PROGRAMS) as some may not # have a compiler that compiles as C++ when given a .cpp source file. From cfe222399d379c8cd33821c944c5f10b96813410 Mon Sep 17 00:00:00 2001 From: John Marshall Date: Mon, 15 Jun 2026 21:37:06 +1200 Subject: [PATCH 3/3] Don't dereference fp after bgzf_close() may have freed it Signed-off-by: John Marshall --- bgzip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgzip.c b/bgzip.c index eda601e97..915007b79 100644 --- a/bgzip.c +++ b/bgzip.c @@ -515,7 +515,7 @@ int main(int argc, char **argv) if (!write_fname) { if (bgzf_close(fp) < 0) - error("Output close failed: Error %d\n", fp->errcode); + error("Output close failed\n"); } if (hclose(f_src) < 0)