Skip to content
Snippets Groups Projects
Verified Commit 28f498e4 authored by cool0616@163.com's avatar cool0616@163.com Committed by Štěpán Henek
Browse files

fixed bug in function 'rule_mask', Parenthesis position error causing operator...

fixed bug in function 'rule_mask', Parenthesis position error causing operator priority error, this may crash
parent 2768ec70
Branches last
No related merge requests found
......@@ -1413,7 +1413,7 @@ rule_mask(struct fw3_ipt_rule *r)
p += SZ(ip6t_entry_match) + m->match->size;
}
memset(p, 0xFF, SZ(ip6t_entry_target) + (r->target) ? r->target->userspacesize : 0);
memset(p, 0xFF, SZ(ip6t_entry_target) + (r->target ? r->target->userspacesize : 0));
}
else
#endif
......@@ -1437,7 +1437,7 @@ rule_mask(struct fw3_ipt_rule *r)
p += SZ(ipt_entry_match) + m->match->size;
}
memset(p, 0xFF, SZ(ipt_entry_target) + (r->target) ? r->target->userspacesize : 0);
memset(p, 0xFF, SZ(ipt_entry_target) + (r->target ? r->target->userspacesize : 0));
}
return mask;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment