When being called from stmt_evaluate_reset(), it seems that 'base' might actually be NULL, so better make sure it is not in proto_find_num(). Signed-off-by: Phil Sutter <phil@xxxxxx> --- This might be invalid in that if 'base' is NULL, ctx->pctx.family is always either NFPROTO_INET or NFPROTO_BRIDGE. But if so, the corresponding check in stmt_evaluate_reset() may be simplified to just having 'base' falling back to &proto_inet_service. --- src/proto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto.c b/src/proto.c index 4c12977cef082..d9210afeaf256 100644 --- a/src/proto.c +++ b/src/proto.c @@ -75,7 +75,7 @@ int proto_find_num(const struct proto_desc *base, { unsigned int i; - for (i = 0; i < array_size(base->protocols); i++) { + for (i = 0; base && i < array_size(base->protocols); i++) { if (base->protocols[i].desc == desc) return base->protocols[i].num; } -- 2.8.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