[PATCH 4/4] meta: fix crash when parsing unresolvable mark values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



*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@xxxxxxxxx>
---
 src/datatype.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/datatype.c b/src/datatype.c
index 9910a1b..86ea80e 100644
--- a/src/datatype.c
+++ b/src/datatype.c
@@ -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;
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux