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:
paolo.ingls@gmail.com
2016-09-26 23:25:16 +02:00
committed by Nick Mathewson
parent 3328658728
commit ab78a4df93
3 changed files with 37 additions and 0 deletions
+2
View File
@@ -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";