diff options
author | paolo.ingls@gmail.com <paolo.ingls@gmail.com> | 2016-09-26 23:25:16 +0200 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-10-11 09:25:22 -0400 |
commit | ab78a4df93d1aed26cb13343cdd012c8309a206f (patch) | |
tree | add974947f715d6c493a1fe42e832f81c50e7591 /src/common/util.c | |
parent | 332865872846c38b518adc4189ca0aa5eaab1378 (diff) | |
download | tor-ab78a4df93d1aed26cb13343cdd012c8309a206f.tar.gz tor-ab78a4df93d1aed26cb13343cdd012c8309a206f.zip |
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.)
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index 259ff8756f..d1c87d3e85 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -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"; |