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>
/* Create or get port by port uuid */
static port_list_t *ovs_stats_new_port(bridge_list_t *bridge,
const char *uuid) {
+ if (uuid == NULL)
+ return NULL;
+
port_list_t *port = ovs_stats_get_port(uuid);
if (port == NULL) {