On Apr 19, 2014, at 9:51 PM, Kmindg G <[email protected]> wrote: > On Sat, Apr 19, 2014 at 3:42 AM, Jarno Rajahalme <[email protected]> > wrote: >> >> static struct cls_match * >> cls_match_alloc(struct cls_rule *rule) >> { >> - struct cls_match *cls_match = xmalloc(sizeof *cls_match); >> + int count = count_1bits(rule->match.flow.map); >> + >> + struct cls_match *cls_match >> + = xmalloc(sizeof *cls_match - sizeof cls_match->flow.inline_values >> + + MINIFLOW_VALUES_SIZE(count)); > > Would it lead to a potential array access violation problem when > 'sizeof cls_match->flow.inline_values' is bigger than > 'MINIFLOW_VALUES_SIZE(count)’?
We do not access the data past the values that are actually used, so no. Jarno
_______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
