diff options
author | demon <demon@FreeBSD.org> | 2013-12-16 19:07:04 +0800 |
---|---|---|
committer | demon <demon@FreeBSD.org> | 2013-12-16 19:07:04 +0800 |
commit | 5c3954134cd7ee76dafacd8e8a8c8ac140680949 (patch) | |
tree | 30f861c312808fda615fc480d42f8a39e2a1d231 /net | |
parent | 982e2a16b72682a6396a6b58ec355f5ead26a589 (diff) | |
download | freebsd-ports-gnome-5c3954134cd7ee76dafacd8e8a8c8ac140680949.tar.gz freebsd-ports-gnome-5c3954134cd7ee76dafacd8e8a8c8ac140680949.tar.zst freebsd-ports-gnome-5c3954134cd7ee76dafacd8e8a8c8ac140680949.zip |
Fix double-free.
Obtained from: upstream
Diffstat (limited to 'net')
-rw-r--r-- | net/haproxy-devel/files/patch-0001-BUG-MAJOR-patterns-fix-double-free-caused-by-loading.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/net/haproxy-devel/files/patch-0001-BUG-MAJOR-patterns-fix-double-free-caused-by-loading.patch b/net/haproxy-devel/files/patch-0001-BUG-MAJOR-patterns-fix-double-free-caused-by-loading.patch new file mode 100644 index 000000000000..c4e96e7f3ee4 --- /dev/null +++ b/net/haproxy-devel/files/patch-0001-BUG-MAJOR-patterns-fix-double-free-caused-by-loading.patch @@ -0,0 +1,33 @@ +From 6762a3061ac0d1d8c8860a2191c602a3c526205c Mon Sep 17 00:00:00 2001 +From: Willy Tarreau <w@1wt.eu> +Date: Mon, 16 Dec 2013 10:40:28 +0100 +Subject: BUG/MAJOR: patterns: fix double free caused by loading strings from + files + +A null pointer assignment was missing after a free in commit 7148ce6 (MEDIUM: +pattern: Extract the index process from the pat_parse_*() functions), causing +a double free after loading a file of string patterns. + +This bug was introduced in 1.5-dev20, no backport is needed. + +Thanks to Sander Klein for reporting this bug and providing the config +needed to trigger it. +--- + src/pattern.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/pattern.c b/src/pattern.c +index ce60f76..8380c63 100644 +--- src/pattern.c ++++ src/pattern.c +@@ -882,6 +882,7 @@ int pattern_register(struct pattern_expr *expr, const char **args, + + /* the "map_parser_str()" function always duplicate string information */ + free((*pattern)->ptr.str); ++ (*pattern)->ptr.str = NULL; + + /* we pre-set the data pointer to the tree's head so that functions + * which are able to insert in a tree know where to do that. +-- +1.7.12.2.21.g234cd45.dirty + |