From 8ba1ba7d8148179a3e1a7c62f1e77f295f6906ee Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 9 Jan 2008 18:23:28 +0000 Subject: tor segfaults when reading a config value that contains a malformed escape sequence; this patch fixes it svn:r13086 --- src/common/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/common/util.c') 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') -- cgit v1.2.3-54-g00ecf