mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08: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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user