Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Release 1.6.3: 22nd May 2025
----------------------------

A tiny bug fix to 1.6.2 to fix a memory leak in rans_compress_to_4x16,
detected by htslib's CI system. (#136)


Release 1.6.2: 22nd May 2025
----------------------------

Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(htscodecs, 1.6.2)
AC_INIT(htscodecs, 1.6.3)

# Some functions benefit from -O3 optimisation, so if the user didn't
# explicitly set any compiler flags, we'll plump for O3.
Expand Down Expand Up @@ -61,7 +61,7 @@ AM_EXTRA_RECURSIVE_TARGETS([fuzz])
# libhtscodecs.so.1.1.0

VERS_CURRENT=3
VERS_REVISION=7
VERS_REVISION=8
VERS_AGE=1
AC_SUBST(VERS_CURRENT)
AC_SUBST(VERS_REVISION)
Expand Down
2 changes: 1 addition & 1 deletion htscodecs/htscodecs.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* Note currently this needs manually editing as it isn't automatically
* updated by autoconf.
*/
#define HTSCODECS_VERSION 100602
#define HTSCODECS_VERSION 100603

/*
* A const string form of the HTSCODECS_VERSION define.
Expand Down
4 changes: 4 additions & 0 deletions htscodecs/rANS_static4x16pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,7 @@ unsigned char *rans_compress_to_4x16(unsigned char *in, unsigned int in_size,
c_meta_len += var_put_u32(&out[1], out_end, in_size);

if (c_meta_len + in_size > *out_size) {
free(out_free);
*out_size = 0;
return NULL;
}
Expand Down Expand Up @@ -1460,6 +1461,7 @@ unsigned char *rans_compress_to_4x16(unsigned char *in, unsigned int in_size,
}

if (c_meta_len > *out_size) {
free(out_free);
free(rle);
free(packed);
*out_size = 0;
Expand All @@ -1473,6 +1475,7 @@ unsigned char *rans_compress_to_4x16(unsigned char *in, unsigned int in_size,
}

if (!rans_enc_func(do_simd, order)(in, in_size, out+c_meta_len, out_size)) {
free(out_free);
free(rle);
free(packed);
*out_size = 0;
Expand All @@ -1484,6 +1487,7 @@ unsigned char *rans_compress_to_4x16(unsigned char *in, unsigned int in_size,
out[0] |= RANS_ORDER_CAT | no_size;

if (out + c_meta_len + in_size > out_end) {
free(out_free);
free(rle);
free(packed);
*out_size = 0;
Expand Down