diff options
author | Roger Dingledine <arma@torproject.org> | 2008-01-09 18:23:28 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-01-09 18:23:28 +0000 |
commit | 8ba1ba7d8148179a3e1a7c62f1e77f295f6906ee (patch) | |
tree | ce7ac7998449d9490b7ad2fb25075634c943ad53 | |
parent | f033bd062f764e48066ea84480e92ccb1b2c0869 (diff) | |
download | tor-8ba1ba7d8148179a3e1a7c62f1e77f295f6906ee.tar.gz tor-8ba1ba7d8148179a3e1a7c62f1e77f295f6906ee.zip |
<tup> tor segfaults when reading a config value that contains a malformed
escape sequence; this patch fixes it
svn:r13086
-rw-r--r-- | src/common/util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c index 357f997f10..143e105ba6 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -2060,7 +2060,8 @@ parse_config_line_from_str(const char *line, char **key_out, char **value_out) /* Find the end of the line. */ if (*line == '\"') { - line = unescape_string(line, value_out, NULL); + if (!(line = unescape_string(line, value_out, NULL))) + return NULL; while (*line == ' ' || *line == '\t') ++line; if (*line && *line != '#' && *line != '\n') |