This patch resolves a Coverity-reported issue where a dereference could occur after a null check in ovsdb_monitor_row_update_type(). An additional condition has been added to ensure a safe early exit in ovsdb_monitor_compose_row_update().
Signed-off-by: Eelco Chaudron <echau...@redhat.com> --- v2: Replaced the assert with an explicit condition check in ovsdb_monitor_row_update_type(). --- ovsdb/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovsdb/monitor.c b/ovsdb/monitor.c index c3bfae3d2..4998687c1 100644 --- a/ovsdb/monitor.c +++ b/ovsdb/monitor.c @@ -681,7 +681,7 @@ ovsdb_monitor_change_set_destroy(struct ovsdb_monitor_change_set *mcs) static enum ovsdb_monitor_selection ovsdb_monitor_row_update_type(bool initial, const bool old, const bool new) { - return initial ? OJMS_INITIAL + return initial ? (new ? OJMS_INITIAL : OJMS_NONE) : !old ? OJMS_INSERT : !new ? OJMS_DELETE : OJMS_MODIFY; -- 2.50.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev