mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
udev: specify the end of value
NULSTR_FOREACH may read the illegal match Signed-off-by: gaoyi <ymuemc@163.com>
This commit is contained in:
parent
d67b1d18fc
commit
1e67a9c2cd
@ -452,6 +452,11 @@ static int rule_line_add_token(UdevRuleLine *rule_line, UdevRuleTokenType type,
|
||||
}
|
||||
}
|
||||
*b = '\0';
|
||||
|
||||
/* Make sure the value is end, so NULSTR_FOREACH can read correct match */
|
||||
if (b < a)
|
||||
b[1] = '\0';
|
||||
|
||||
if (bar)
|
||||
empty = true;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user