~ubuntu-branches/ubuntu/wily/haproxy/wily

« back to all changes in this revision

Viewing changes to debian/patches/from-upstream/0008-BUG-MEDIUM-patterns-previous-fix-was-incomplete.patch

  • Committer: Package Import Robot
  • Author(s): Vincent Bernat
  • Date: 2015-01-04 13:17:56 UTC
  • mfrom: (15.1.14 experimental)
  • Revision ID: package-import@ubuntu.com-20150104131756-2z3faattnugqs2nh
Tags: 1.5.10-1
* New upstream stable release including the following fixes:
    - BUG/MAJOR: stream-int: properly check the memory allocation return
    - BUG/MEDIUM: sample: fix random number upper-bound
    - BUG/MEDIUM: patterns: previous fix was incomplete
    - BUG/MEDIUM: payload: ensure that a request channel is available
    - BUG/MEDIUM: tcp-check: don't rely on random memory contents
    - BUG/MEDIUM: tcp-checks: disable quick-ack unless next rule is an expect
    - BUG/MEDIUM: config: do not propagate processes between stopped
                  processes
    - BUG/MEDIUM: memory: fix freeing logic in pool_gc2()
    - BUG/MEDIUM: compression: correctly report zlib_mem
* Upload to experimental.

Show diffs side-by-side

added added

removed removed

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