mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
pf: zero (another) output buffer in pfioctl
Avoid potential structure padding leak. r350294 identified a leak via static analysis; although there's no report of a leak with the DIOCGETSRCNODES ioctl it's a good practice to zero the memory. Suggested by: kp MFC after: 3 days Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
1153929465
commit
c54ee572e5
1 changed files with 1 additions and 1 deletions
|
|
@ -3752,7 +3752,7 @@ DIOCCHANGEADDR_error:
|
|||
|
||||
nr = 0;
|
||||
|
||||
p = pstore = malloc(psn->psn_len, M_TEMP, M_WAITOK);
|
||||
p = pstore = malloc(psn->psn_len, M_TEMP, M_WAITOK | M_ZERO);
|
||||
for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask;
|
||||
i++, sh++) {
|
||||
PF_HASHROW_LOCK(sh);
|
||||
|
|
|
|||
Loading…
Reference in a new issue