packages/net/haproxy/patches/0001-BUG-MEDIUM-patterns-previous-fix-was-incomplete.patch
Thomas Heil 9912b6cbff haproxy: update to version 1.9 patch 02
- BUILD: fix "make install" to support spaces in the install dirs
 - BUG/MEDIUM: checks: fix conflicts between agent checks and ssl healthchecks
 - BUG/MEDIUM: ssl: fix bad ssl context init can cause segfault in case of OOM.
 - BUG/MINOR: samples: fix unnecessary memcopy converting binary to string.
 - BUG/MEDIUM: connection: sanitize PPv2 header length before parsing address information
 - BUG/MEDIUM: pattern: don't load more than once a pattern list.
 - BUG/MEDIUM: ssl: force a full GC in case of memory shortage
 - BUG/MINOR: config: don't inherit the default balance algorithm in frontends
 - BUG/MAJOR: frontend: initialize capture pointers earlier
 - BUG/MINOR: stats: correctly set the request/response analysers
 - DOC: fix typo in the body parser documentation for msg.sov
 - BUG/MINOR: peers: the buffer size is global.tune.bufsize, not trash.size
 - MINOR: sample: add a few basic internal fetches (nbproc, proc, stopping)
 - BUG/MAJOR: sessions: unlink session from list on out of memory
 - BUG/MEDIUM: patterns: previous fix was incomplete
 - BUG/MEDIUM: payload: ensure that a request channel is available

Signed-off-by: Thomas Heil <heil@terminal-consulting.de>
2014-12-05 13:02:19 +01:00

34 lines
1.2 KiB
Diff

From bad3c6f1b6d776e5d9951a3b3054b4dce8922c54 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w@1wt.eu>
Date: Wed, 26 Nov 2014 13:17:03 +0100
Subject: [PATCH 1/2] BUG/MEDIUM: patterns: previous fix was incomplete
Dmitry Sivachenko <trtrmitya@gmail.com> reported that commit 315ec42
("BUG/MEDIUM: pattern: don't load more than once a pattern list.")
relies on an uninitialised variable in the stack. While it used to
work fine during the tests, if the uninitialized variable is non-null,
some patterns may be aggregated if loaded multiple times, resulting in
slower processing, which was the original issue it tried to address.
The fix needs to be backported to 1.5.
(cherry picked from commit 4deaf39243c4d941998b1b0175bad05b8a287c0b)
---
src/pattern.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pattern.c b/src/pattern.c
index 20547f9..208e33a 100644
--- a/src/pattern.c
+++ b/src/pattern.c
@@ -2096,7 +2096,7 @@ int pattern_read_from_file(struct pattern_head *head, unsigned int refflags,
struct pat_ref *ref;
struct pattern_expr *expr;
struct pat_ref_elt *elt;
- int reuse;
+ int reuse = 0;
/* Lookup for the existing reference. */
ref = pat_ref_lookup(filename);
--
2.0.4