Repository navigation
Download the source code here: htslib-1.25.tar.bz2.(The "Source code" downloads are generated by GitHub and are incomplete as they are missing some generated files.)
- NEW. Added environment variable HTS_GCS_HOST, analogous to the existing HTS_S3_HOST, to redirect gs:// URLs to a caller-specified endpoint.
(PR #2051. Thanks to Peter Dowdy)
Updates
-
Various code quality improvements. Added memory and error checks. Some changes to better data types.
(PR #2054, PR #2059, PR #2064, PR #2066, PR #2070, PR #2073, PR #2075, PR #2077, PR #2078) -
Add a new format option to strip UR tags from CRAM.
(PR #2056, partial fix for samtools/samtools#2327. Requested by Florian Plaza Oñate) -
Report when khash can no longer expand.
(PR #2063) -
Use multi iterators in the synced reader. This adds bcf_itr_regions() and tbx_itr_regions() interfaces as BCF and tabix equivalents to sam_itr_regions(). This can speed up
bcftools view.
(PR #2052, fixes samtools/bcftools#2557. Reported by Carsten Erickson) -
Apply CURL_CA_BUNDLE environment variable in the S3 backend.
(PR #2069. Thanks to John Marshall) -
Cram embed_ref=2 and huffman optimisation.
(PR #2082) -
API fix. Protect against out of bounds ref id in cram_put_bam_seq.
(PR #2087) -
Adds validation to options specified using hts_opt_add or cram_set_voption. Mostly for overflow detection.
(PR #2095. Reported by Sn0wyDay) -
Return an error instead of calling abort in hts_getline().
(PR #2093, fixes #2091. Reported by an) -
bcf_set_variant_type() now recognises single break-ends as described in section 5.4.9 of the VCF 4.5 specification.
(PR #2115, fixes #2108)
Build Changes
-
Add more CI tests for a variety of Linux and non-Linux platforms.
(PR #2053) -
Update build badge, remove .cirrus.yml, spelling corrections.
(PR #2071. Thanks to John Marshall) -
Make check_copyright.pl better at skipping auto-generated files.
(PR #2080) -
Use bash and pipefail for tests using simple_test_driver.sh
(PR #2083) -
Add S3 integration tests.
(PR #2067. Thanks to Peter Dowdy)
Bug fixes
-
Fix a use-after-free bug when renewing http authentication tokens. This could happen if the file used to supply a replacement token was not present at renewal time.
(PR #2119 Reported by Xuqing Yang. GHSA-x79c-vxf6-6j9c) -
Fix use-after-free and double free when handling file close errors in the preload:// file reader.
(PR #2119 Reported by Xuqing Yang. GHSA-5cvj-m89h-h3cw) -
Fix inconsistent region list clean-up on hts_itr_regions() failure. This function takes ownership of the region list passed to it, even if it fails due to out-of-memory conditions. Not accounting for this correctly led to a possible double free in the functions used to build multi-region iterators.
(PR #2119. Reported by Xuqing Yang. GHSA-2r8w-wxh5-c7r8) -
Fix a double free on out-of-memory conditions in the CRAM BYTE_ARRAY_LEN encoder.
(PR #2119. Reported by Xuqing Yang. GHSA-2r8w-wxh5-c7r8) -
Fix possible free of an uninitialised pointer if read errors occurred when loading .bai, .csi, or .tbx indexes.
(PR #2119. Reported by maxmlz. GHSA-38qp-vpxq-r6xc) -
Properly validate index metadata before attempting to access it.
(PR #2119. GHSA-vhg8-qwm7-cv9m) -
Fix use-after-free in bcf_sr_destroy1() if it tries to report an error on file close.
(PR #2119. Reported by Junki Lee. GHSA-644m-mq4p-c7c6) -
Reject VCF records containing ASCII NUL bytes in FORMAT data.
(PR #2119. Reported by haehet. GHSA-6qq4-hj39-g6ph) -
Validate tid value passed to hts_idx_get_stat() to prevent out-of-bounds reads.
(PR #2119. Reported by haehet. GHSA-vhg8-qwm7-cv9m) -
Fix an undefined behaviour in os/rand.c
(PR #2050) -
Fix heapsort bug and add ksort tests and improved documentation in comments.
(PR #2055) -
Fix possible leak of bgzidx_t::offs and changes to bgzidx_t::noffs and bgzidx_t::moffs data types.
(PR #2057) -
Remove an assert in cram_index_build and have it fail more gracefully.
(PR #2061, fixes #2060. Reported and co-authored by Shujie Xiang) -
Remove an infinite loop in bam_mods_at_qpos().
(PR #2068) -
Avoid calling libcurl functions if curl_global_init() failed.
(Part of PR #2069. Thanks to John Marshall) -
Make sam_format_aux1 'A' type be nul terminated.
(PR #2079) -
Fix multiple VCF header parsing bugs.
(PR #2074, fixes #2065 Reported by Mark Woon) -
Prevent integer overflow in resolve_cigar2().
(PR #2072) -
Improved code testing with the addition of a fuzzer for the expression filters (hts_expr). This resulted in the detection and correction of several serious expression parsing bugs.
(PR #2076) -
Fix leak of region list in hts_itr_multi_bam().
(PR #2084) -
Improve checking of SEQ/CIGAR consistency when processing records with CG tags.
(PR # 2089. Fixes oss-fuzz issue 560967311) -
Stop the CRAM zlib decoder from getting stuck in an endless loop.
(PR #2085, fixes #2081. Reported by Sewon Ahn) -
Fix hts_set_filter_expression(fp, NULL) so that it properly disables filtering without leaving a dangling pointer.
(PR #2094. Reported and code fix suggestion by Sewon Ahn) -
Tighten version number limits in bcf_get_version()
(PR #2092, fixes #2088. Reported by an) -
Fix CRAM query of unaligned ('*') reads.
(PR #2100, fixes samtools/samtools#2396. Reported by Matt Sexton) -
Fix hfile_s3 reads failing at EOF on a part boundary.
(PR #2098, fixes #2097. Thanks to Peter Dowdy) -
Reduce CRAM decode memory usage when multi-threading. Previous improvements to threaded throughput added greater memory usage, especially with long reads. This change mitigates that.
(PR #2102, fixes samtools/samtools#2393. Reported by Matthieu Muffato) -
Prevent negative range start in multi-region iterators, which could in some cases cause the index look-up to become stuck in an endless loop.
(PR #2110. Reported by haehet) -
Fix SQ line removal using sam_hdr_remove_lines(). It failed to update some internal sam_hdr_t structures, leading to deleted SQ lines reappearing, notably when writing BAM files.
(PR #2105) -
Fix the wildly incorrect length value returned by hfile_mem_get_buffer() and hfile_mem_steal_buffer().
(PR #2109) -
Fix a number of bugs that could be triggered by removing all samples with bcf_hdr_set_samples().
(PR #2114) -
Fix fai_load3() crash if a .fai index was present but it attempted a rebuild because it also needed a .gzi one, and the rebuild failed.
(PR #2116)
Download the source code here: htslib-1.25.tar.bz2.(The "Source code" downloads are generated by GitHub and are incomplete as they are missing some generated files.)