From eda36f1c2327ab5d03f8b341c9d2a28b5e72286f Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 13 Dec 2021 09:07:05 +0100 Subject: [PATCH] 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 --- src/slz.c | 2 ++ 1 file changed, 2 insertions(+) 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;