mirror of
https://github.com/systemd/systemd.git
synced 2025-03-23 10:50:16 +03:00
udev-rules.c: parse_file() - fix possible buffer overflow
This commit is contained in:
parent
710fdac1e4
commit
6d691b2bd6
@ -1599,6 +1599,8 @@ static int parse_file(struct udev_rules *rules, const char *filename, unsigned s
|
||||
while (line[len-2] == '\\') {
|
||||
if (fgets(&line[len-2], (sizeof(line)-len)+2, f) == NULL)
|
||||
break;
|
||||
if (strlen(&line[len-2]) < 2)
|
||||
break;
|
||||
line_nr++;
|
||||
len = strlen(line);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user