]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
meta: fix crash when parsing unresolvable mark values
authorPatrick McHardy <kaber@trash.net>
Fri, 10 Jan 2014 09:28:37 +0000 (09:28 +0000)
committerPatrick McHardy <kaber@trash.net>
Fri, 10 Jan 2014 09:28:37 +0000 (09:28 +0000)
*res has undefined contents, set to NULL before invoking the parse function
to make sure the test for != NULL doesn't falsely return true.

Signed-off-by: Patrick McHardy <kaber@trash.net>
src/datatype.c

index 9910a1b3264a5c77b8b207f5028619ce6616260c..86ea80e3ce3ff4ed0fd960f6fb7ce5d51ba11d5e 100644 (file)
@@ -643,6 +643,7 @@ static struct error_record *mark_type_parse(const struct expr *sym,
                }
        }
 
+       *res = NULL;
        erec = sym->dtype->basetype->parse(sym, res);
        if (erec != NULL)
                return erec;