From 33500edd53fd76a304766812fd0829e7f3ab222f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 15 Mar 2012 14:06:54 -0700 Subject: [PATCH] meta-flow: Don't dereference NULL sf->field in mf_format_subfield(). Signed-off-by: Ben Pfaff --- lib/meta-flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/meta-flow.c b/lib/meta-flow.c index c12a9097..11d27b15 100644 --- a/lib/meta-flow.c +++ b/lib/meta-flow.c @@ -2343,7 +2343,7 @@ mf_format_subfield(const struct mf_subfield *sf, struct ds *s) ds_put_cstr(s, sf->field->name); } - if (sf->ofs == 0 && sf->n_bits == sf->field->n_bits) { + if (sf->field && sf->ofs == 0 && sf->n_bits == sf->field->n_bits) { ds_put_cstr(s, "[]"); } else if (sf->n_bits == 1) { ds_put_format(s, "[%d]", sf->ofs); -- 2.30.2