HomeFreeBSD

MAC/do: parse_rule_element(): Bug in parsing the origin ID

Description

MAC/do: parse_rule_element(): Bug in parsing the origin ID

The ID field was allowed to be empty, which would be then parsed as 0 by
strtol(). There remains bugs in this function, where parsing for from-
or to- IDs accepts spaces and produces 0, but this will conveniently be
fixed in a later commit introducing strtoui_strict().

Reviewed by: bapt
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47612

Details

Provenance
olceAuthored on Jul 5 2024, 11:49 AM
Reviewer
bapt
Differential Revision
D47612: MAC/do: parse_rule_element(): Bug in parsing the origin ID
Parents
rGe4ce30f8da61: MAC/do: parse_rule_element(): Style, more clarity
Branches
Unknown
Tags
Unknown