From 8e80e0bc4c46ba2b156e24dc1eb43a735ebf9783 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 10 May 2009 12:05:46 +0200 Subject: [PATCH] [BUG] fix parser crash on unconditional tcp content rules Since 1.3.17, a config containing one of the following lines would crash the parser : tcp content reject tcp content accept This is because a check is performed on the condition which is not specified. The obvious fix consists in checkinf for a condition first. --- src/proto_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto_tcp.c b/src/proto_tcp.c index 8c1ae222ed..4d0ae35596 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -521,7 +521,7 @@ static int tcp_parse_tcp_req(char **args, int section_type, struct proxy *curpx, // FIXME: how to set this ? // cond->line = linenum; - if (cond->requires & (ACL_USE_RTR_ANY | ACL_USE_L7_ANY)) { + if (cond && cond->requires & (ACL_USE_RTR_ANY | ACL_USE_L7_ANY)) { struct acl *acl; const char *name; -- 2.39.5