One of the memset call is buggy: it does not erase full array, but only
pointer size.
Moreover, after a check, first step of nla_parse_nested/nla_parse is to
erase tb array as well. We can remove both calls safely.
Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.fr>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
int nla_rem;
nla_for_each_nested(nla, attr[IPSET_ATTR_ADT], nla_rem) {
int nla_rem;
nla_for_each_nested(nla, attr[IPSET_ATTR_ADT], nla_rem) {
- memset(tb, 0, sizeof(tb));
if (nla_type(nla) != IPSET_ATTR_DATA ||
!flag_nested(nla) ||
NLA_PARSE_NESTED(tb, IPSET_ATTR_ADT_MAX, nla,
if (nla_type(nla) != IPSET_ATTR_DATA ||
!flag_nested(nla) ||
NLA_PARSE_NESTED(tb, IPSET_ATTR_ADT_MAX, nla,
int nla_rem;
nla_for_each_nested(nla, attr[IPSET_ATTR_ADT], nla_rem) {
int nla_rem;
nla_for_each_nested(nla, attr[IPSET_ATTR_ADT], nla_rem) {
- memset(tb, 0, sizeof(*tb));
if (nla_type(nla) != IPSET_ATTR_DATA ||
!flag_nested(nla) ||
NLA_PARSE_NESTED(tb, IPSET_ATTR_ADT_MAX, nla,
if (nla_type(nla) != IPSET_ATTR_DATA ||
!flag_nested(nla) ||
NLA_PARSE_NESTED(tb, IPSET_ATTR_ADT_MAX, nla,