ovs_stats: fix potential NULL dereference
authorMark Kavanagh <mark.b.kavanagh@intel.com>
Mon, 19 Feb 2018 13:48:12 +0000 (13:48 +0000)
committerCiara Loftus <ciara.loftus@intel.com>
Tue, 27 Mar 2018 09:46:54 +0000 (10:46 +0100)
commit86f2ca0370eaec2cbd6a5af36534e8bf12954a81
tree09dd6e3e01f12f70237a913af76d58d305a42089
parent2b719323d06bb58f23fa7c43135739d0ab0cca12
ovs_stats: fix potential NULL dereference

ovs_stats_new_port() accepts a character pointer, uuid, as a parameter,
and copies it into port->uuid. Later, this value is dereferenced in
ovs_stats_update_bridge(). If uuid was NULL, then a SEGV will occur.

Resolve this issue by checking if uuid is NULL in ovs_stats_new_port().

Fixes: 481984e ("ovs_stats: Implement OVS statistics plugin.")
Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
src/ovs_stats.c