<tup> tor segfaults when reading a config value that contains a malformed

escape sequence; this patch fixes it


svn:r13086
This commit is contained in:
Roger Dingledine 2008-01-09 18:23:28 +00:00
parent f033bd062f
commit 8ba1ba7d81

View File

@ -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')