HomeFreeBSD

ng_parse: Add upper bound to avoid possible overflow

Description

ng_parse: Add upper bound to avoid possible overflow

Also move num initialization for clarity.

We still need to check num in ng_unparse_composite (reported by des@ in
D52151) but this is another incremental improvement in netgraph input
validation.

Reviewed by: des
PR: 267334
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52151

Details

Provenance
emasteAuthored on Aug 25 2025, 2:25 PM
Reviewer
des
Differential Revision
D52151: ng_parse: Add upper bound to avoid possible overflow
Parents
rG21628c79d541: date(1): Improve manpage around '-I'
Branches
Unknown
Tags
Unknown