Do not modify cmd pointer if it is already last opcode in the rule.
MFC after: 1 week
This commit is contained in:
parent
4ee2f4c180
commit
2dab0de635
@ -387,7 +387,7 @@ ipfw_reset_eaction(struct ip_fw_chain *ch, struct ip_fw *rule,
|
||||
while (l > 0) {
|
||||
cmdlen = F_LEN(cmd);
|
||||
l -= cmdlen;
|
||||
if (cmd->opcode == O_EXTERNAL_ACTION)
|
||||
if (cmd->opcode == O_EXTERNAL_ACTION || l <= 0)
|
||||
break;
|
||||
cmd += cmdlen;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user