From: Willy Tarreau Date: Mon, 13 Dec 2021 08:07:05 +0000 (+0100) Subject: IMPORT: slz: declare len to fix debug build when optimal match is enabled X-Git-Tag: v2.7-dev9~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eda36f1c2327ab5d03f8b341c9d2a28b5e72286f;p=thirdparty%2Fhaproxy.git IMPORT: slz: declare len to fix debug build when optimal match is enabled Building with -DFIND_OPTIMAL_MATCH would fail on undeclared "len". This one likely vanished in some cleanup. This is libslz upstream commit 1ea20360715e1ad0cd81db83fa4361310716b8cc --- diff --git a/src/slz.c b/src/slz.c index 0ca9d279c3..1d6032ea2e 100644 --- a/src/slz.c +++ b/src/slz.c @@ -578,6 +578,8 @@ long slz_rfc1951_encode(struct slz_stream *strm, unsigned char *out, const unsig int max_lookup = 2; // 0 = no limit for (scan = pos - 1; scan < pos && (unsigned long)(pos - scan - 1) < 32768; scan--) { + int len; + if (*(uint32_t *)(in + scan) != word) continue;