mirror of
https://github.com/troglobit/finit.git
synced 2026-11-15 19:13:11 +00:00
Fix interface bring up message NULL ptr deref
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
6380f17d1f
commit
38619966ee
1 file changed
+7
-5
@@ -107,12 +107,14 @@ static void networking(void)
|
|||||||
|
|
||||||
/* Bring up all 'auto' interfaces */
|
/* Bring up all 'auto' interfaces */
|
||||||
while (fgets(buf, sizeof(buf), fp)) {
|
while (fgets(buf, sizeof(buf), fp)) {
|
||||||
chomp(buf);
|
char *cmd;
|
||||||
strip_line(buf);
|
|
||||||
|
|
||||||
if (!strncmp(buf, "auto", 4)) {
|
chomp(buf);
|
||||||
memcpy(buf, "ifup", 4);
|
cmd = strip_line(buf);
|
||||||
run_interactive(buf, "Bringing up interface %s", buf[5]);
|
|
||||||
|
if (!strncmp(cmd, "auto", 4)) {
|
||||||
|
memcpy(cmd, "ifup", 4);
|
||||||
|
run_interactive(cmd, "Bringing up interface %s", &cmd[5]);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user