[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10835: stop reading uninitialized/outofbounds memory. possible back (tor/trunk/src/or)



Author: arma
Date: 2007-07-15 23:39:21 -0400 (Sun, 15 Jul 2007)
New Revision: 10835

Modified:
   tor/trunk/src/or/routerparse.c
Log:
stop reading uninitialized/outofbounds memory. possible backport,
quite related to bug 455.


Modified: tor/trunk/src/or/routerparse.c
===================================================================
--- tor/trunk/src/or/routerparse.c	2007-07-16 01:14:26 UTC (rev 10834)
+++ tor/trunk/src/or/routerparse.c	2007-07-16 03:39:21 UTC (rev 10835)
@@ -892,7 +892,7 @@
     }
     end = tor_memstr(*s, eos-*s, "\nrouter-signature");
     if (end)
-      end = tor_memstr(end, eos-*s, "\n-----END SIGNATURE-----\n");
+      end = tor_memstr(end, eos-end, "\n-----END SIGNATURE-----\n");
     if (end)
       end += strlen("\n-----END SIGNATURE-----\n");