HomeFreeBSD

pfctl: fix crash on "pfctl -a '*' -vvsr"

Description

pfctl: fix crash on "pfctl -a '*' -vvsr"

When printing a nat anchor we don't have rule information, or rule
counters. Do not attempt to print them. The information is nonsensical
anyway, and this can cause a crash converting the timestamp to a string,
as years in the very distant future use more digits, and we exceed the
30 byte buffer allocated for this.

MFC after: 2 weeks
Sponsored by: Orange Business Services

(cherry picked from commit 168d873ae41fd8bd40555322a79c9f215cb4cb9c)

Details

Provenance
kpAuthored on Mon, Apr 14, 4:41 PM
Parents
rG4df4b69530c3: pf: explicitly NULL state key pointers
Branches
Unknown
Tags
Unknown