HomeFreeBSD

pf: Fix a use of an uninitialized variable

Description

pf: Fix a use of an uninitialized variable

pf_find_state_all() expects the caller to initialize "*more" if it is
non-NULL, but pf_handle_natlook() didn't obey this protocol. Follow the
pattern from OpenBSD and initialize it in the caller.

Also make pf_find_state_all() unconditionally initialize "*more" for
good measure.

Fixes: 71d3c7041d70 ("pf: convert DIOCNATLOOK to netlink")
Reported by: KMSAN
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D47405

Details

Provenance
markjAuthored on Nov 3 2024, 2:36 PM
Reviewer
kp
Differential Revision
D47405: pf: Fix a use of an uninitialized variable
Parents
rG5169d4307eb9: nfs: Fallback to GID_NOGROUP on no groups
Branches
Unknown
Tags
Unknown