[or-cvs] router_get_hash_impl would fail when end_str started with \...

Nick Mathewson nickm at seul.org
Sat Aug 7 03:25:44 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv24703/src/or

Modified Files:
	routerparse.c 
Log Message:
router_get_hash_impl would fail when end_str started with \n.  Now it works.

Index: routerparse.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerparse.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- routerparse.c	7 Aug 2004 02:46:16 -0000	1.26
+++ routerparse.c	7 Aug 2004 03:25:42 -0000	1.27
@@ -1319,7 +1319,7 @@
     log_fn(LOG_WARN,"couldn't find \"%s\"",end_str);
     return -1;
   }
-  end = strchr(end, '\n');
+  end = strchr(end+strlen(end_str), '\n');
   if (!end) {
     log_fn(LOG_WARN,"couldn't find EOL");
     return -1;



More information about the tor-commits mailing list