On 3/17/20 10:50 PM, Gregory Rose wrote: > > On 3/17/2020 2:39 PM, William Tu wrote: >> Coverity reports use of uninitialized value of cursor. >> This happens in cls_cursor_start(), when rule is false, >> cursor.subtable is uninitialized. CID 279324. >> >> Signed-off-by: William Tu <[email protected]> >> --- >> lib/classifier.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/lib/classifier.c b/lib/classifier.c >> index 0fad953213e4..a22f9fb957ea 100644 >> --- a/lib/classifier.c >> +++ b/lib/classifier.c >> @@ -1370,6 +1370,7 @@ cls_cursor_start(const struct classifier *cls, const >> struct cls_rule *target, >> struct cls_cursor cursor; >> struct cls_subtable *subtable; >> + memset(&cursor, 0x0, sizeof cursor); >> cursor.cls = cls; >> cursor.target = target && !cls_rule_is_catchall(target) ? target : >> NULL; >> cursor.version = version; > > Reviewed-by: Greg Rose <[email protected]>
Thanks! Applied to master and backported down to 2.10. Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
