From 5b7969f54aadcb9b27ff9f9514e4c4e861c02505 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 18 Nov 2013 12:37:38 +0000 Subject: [PATCH] Skip redirects with invalid options --- redirects.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/redirects.c b/redirects.c index ca5d4d1..81e93e3 100644 --- a/redirects.c +++ b/redirects.c @@ -247,7 +247,12 @@ fw3_load_redirects(struct fw3_state *state, struct uci_package *p) valid = false; - fw3_parse_options(redir, fw3_redirect_opts, s); + if (!fw3_parse_options(redir, fw3_redirect_opts, s)) + { + warn_elem(e, "skipped due to invalid options"); + fw3_free_redirect(redir); + continue; + } if (!redir->enabled) { -- 2.25.1