Fix the copy of addresses passed from userland in table replace command.
The size2 is the maximum userland buffer size (used when the addresses are copied back to userland). Obtained from: pfSense MFC after: 3 days Sponsored by: Rubicon Communications (Netgate)
This commit is contained in:
parent
e462b12755
commit
f2fc809dcd
@ -2724,8 +2724,7 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td
|
||||
error = ENODEV;
|
||||
break;
|
||||
}
|
||||
totlen = (io->pfrio_size + io->pfrio_size2) *
|
||||
sizeof(struct pfr_addr);
|
||||
totlen = io->pfrio_size * sizeof(struct pfr_addr);
|
||||
pfras = malloc(totlen, M_TEMP, M_WAITOK);
|
||||
error = copyin(io->pfrio_buffer, pfras, totlen);
|
||||
if (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user