[or-cvs] r13086: <tup> tor segfaults when reading a config value that contain (tor/trunk/src/common)

arma at seul.org arma at seul.org
Wed Jan 9 18:23:28 UTC 2008


Author: arma
Date: 2008-01-09 13:23:28 -0500 (Wed, 09 Jan 2008)
New Revision: 13086

Modified:
   tor/trunk/src/common/util.c
Log:
<tup> tor segfaults when reading a config value that contains a malformed
escape sequence; this patch fixes it


Modified: tor/trunk/src/common/util.c
===================================================================
--- tor/trunk/src/common/util.c	2008-01-09 15:11:49 UTC (rev 13085)
+++ tor/trunk/src/common/util.c	2008-01-09 18:23:28 UTC (rev 13086)
@@ -2060,7 +2060,8 @@
 
   /* 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')



More information about the tor-commits mailing list