aboutsummaryrefslogtreecommitdiff
These changes are commits d7e357946ead219b81cc1becbe0de8a99d96ca84 and
8ed0daa39bc662defa99507f926815431056543a in
https://github.com/samtools/htscodecs.  The stringtie package expects these
changes to have been applied.

diff -ru htslib-1.12/htscodecs/htscodecs/tokenise_name3.c stringtie-2.2.0/htslib/htscodecs/htscodecs/tokenise_name3.c
--- a/htscodecs/htscodecs/tokenise_name3.c	2021-02-22 13:07:06.000000000 +0100
+++ b/htscodecs/htscodecs/tokenise_name3.c	2021-12-04 19:27:39.000000000 +0100
@@ -211,7 +211,7 @@
 	if (!ctx) return NULL;
 	ctx->max_names = max_names;
 	pthread_setspecific(tok_key, ctx);
-    } else if (ctx->max_names < max_names) {
+    } else if (ctx->max_names < max_names+1) {
 	ctx = realloc(ctx, sizeof(*ctx) + ++max_names*sizeof(*ctx->lc));
 	if (!ctx) return NULL;
 	ctx->max_names = max_names;
@@ -1058,6 +1058,8 @@
 	tok = decode_token_type(ctx, ntok);
 	//fprintf(stderr, "Tok %d = %d\n", ntok, tok);
 
+	ctx->lc[cnum].last_ntok = 0;
+
 	switch (tok) {
 	case N_CHAR:
 	    if (len+1 >= name_len) return -1;
13232. * gnu/packages/patches/unzip-COVSCAN-fix-unterminated-string.patch, gnu/packages/patches/unzip-CVE-2016-9844.patch, gnu/packages/patches/unzip-CVE-2018-1000035.patch, gnu/packages/patches/unzip-CVE-2018-18384.patch, gnu/packages/patches/unzip-case-insensitive.patch, gnu/packages/patches/unzip-alt-iconv-utf8-print.patch, gnu/packages/patches/unzip-alt-iconv-utf8.patch, gnu/packages/patches/unzip-close.patch, gnu/packages/patches/unzip-exec-shield.patch, gnu/packages/patches/unzip-fix-recmatch.patch, gnu/packages/patches/unzip-manpage-fix.patch, gnu/packages/patches/unzip-overflow.patch, gnu/packages/patches/unzip-symlink.patch, gnu/packages/patches/unzip-timestamp.patch, gnu/packages/patches/unzip-valgrind.patch, gnu/packages/patches/unzip-x-option.patch, gnu/packages/patches/unzip-zipbomb-manpage.patch, gnu/packages/patches/unzip-zipbomb-part1.patch, gnu/packages/patches/unzip-zipbomb-part2.patch, gnu/packages/patches/unzip-zipbomb-part3.patch: New patches. * gnu/local.mk (dist_patch_DATA): Register them. * gnu/packages/compression.scm (unzip/fixed): New variable. Apply patches. (unzip)[replacement]: Graft. Léo Le Bouter