HomeFreeBSD

The rule field in the ipfw_dyn_rule structure is used as storage

Description

The rule field in the ipfw_dyn_rule structure is used as storage
to pass rule number and rule set to userland. In r272840 the kernel
internal rule representation was changed and the rulenum field of
struct ip_fw_rule got the type uint32_t, but userlevel representation
still have the type uint16_t. To not overflow the size of pointer
on the systems with 32-bit pointer size use separate variable to
copy rulenum and set.

Reported by: PVS-Studio
MFC after: 1 week

Details

Provenance
aeAuthored on
Parents
rS316823: Fix the build.
Branches
Unknown
Tags
Unknown