On Apr 19, 2014, at 9:51 PM, Kmindg G <kmi...@gmail.com> wrote: > On Sat, Apr 19, 2014 at 3:42 AM, Jarno Rajahalme <jrajaha...@nicira.com> > 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 dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev