mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
torrc parsing b0rks on carriage-return
(Specifically, carriage return after a quoted value in a config line. Fixes bug 19167; bugfix on 0.2.0.16-alpha when we introduced support for quoted values. Unit tests, changes file, and this parenthetical by nickm.)
This commit is contained in:
committed by
Nick Mathewson
parent
3328658728
commit
ab78a4df93
@@ -3079,6 +3079,8 @@ parse_config_line_from_str_verbose(const char *line, char **key_out,
|
||||
}
|
||||
while (*line == ' ' || *line == '\t')
|
||||
++line;
|
||||
if (*line == '\r' && *(++line) == '\n')
|
||||
++line;
|
||||
if (*line && *line != '#' && *line != '\n') {
|
||||
if (err_out)
|
||||
*err_out = "Excess data after quoted string";
|
||||
|
||||
Reference in New Issue
Block a user