Secure config errors

If user can make NETHACKOPTIONS point to a file, that user could then
get the file contents via the extended config file error reporting.
Add CONFIG_ERROR_SECURE compile-time option to make that case output
only the first error, no line number or error context.
This commit is contained in:
Pasi Kallinen
2017-09-10 21:05:45 +03:00
parent 0d24113577
commit 9c118b5b6b
6 changed files with 38 additions and 17 deletions

View File

@@ -405,7 +405,7 @@ char *argv[];
}
break;
case 'w': /* windowtype */
config_error_init(FALSE, "command line");
config_error_init(FALSE, "command line", FALSE);
choose_windows(&argv[0][2]);
config_error_done();
break;