mirror of
https://code.semirocket.science/wrapsix
synced 2026-10-18 00:19:31 +03:00
Slightly better handling of incorrect config files
This commit is contained in:
1 parent
be5743c099
commit
64907ebf5c
1 file changed
+2
-2
+2
-2
@@ -98,7 +98,7 @@ int cfg_parse(const char *config_file, unsigned short *cmtu,
|
||||
/* comments */
|
||||
if (c == '#') {
|
||||
/* skip this line */
|
||||
while (c = getc(f), c != '\n');
|
||||
while (c = getc(f), c != '\n' && !feof(f));
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ int cfg_parse(const char *config_file, unsigned short *cmtu,
|
||||
|
||||
/* skip rest of this line */
|
||||
if (c != '\n') {
|
||||
while (c = getc(f), c != '\n');
|
||||
while (c = getc(f), c != '\n' && !feof(f));
|
||||
}
|
||||
|
||||
/* recognize the option */
|
||||
|
||||
Reference in new issue
Block a user