From: Jo-Philipp Wich Date: Mon, 18 Nov 2013 12:37:38 +0000 (+0000) Subject: Skip redirects with invalid options X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5b7969f54aadcb9b27ff9f9514e4c4e861c02505;p=oweals%2Ffirewall3.git Skip redirects with invalid options --- 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) {