meta-flow: Avoid null pointer dereference in mf_format_frag_string().
authorBen Pfaff <blp@nicira.com>
Thu, 24 Jan 2013 21:39:23 +0000 (13:39 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 31 Jan 2013 22:15:58 +0000 (14:15 -0800)
commit9d7680033e5d79b69b11aa768718008fc21cb134
tree889b99f1bf6faf03550b80dc194a3dbbd4525ba1
parent7c944cb900ec3a1f309148adb79fc339961cc6f4
meta-flow: Avoid null pointer dereference in mf_format_frag_string().

The 'maskp' parameter to this function can be NULL, but the function
always dereferenced it.  This commit fixes the problem.

This commit also fixes the order in which the value and mask were adjusted
to correctly discard 1-bits outside of FLOW_NW_FRAG_MASK.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/meta-flow.c