[or-cvs] Fix segfault in unit tests. (Main program is unaffected)

Nick Mathewson nickm at seul.org
Sun Oct 17 15:45:58 UTC 2004


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

Modified Files:
	test.c 
Log Message:
Fix segfault in unit tests.  (Main program is unaffected)

Index: test.c
===================================================================
RCS file: /home/or/cvsroot/src/or/test.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -d -r1.130 -r1.131
--- test.c	16 Oct 2004 22:14:52 -0000	1.130
+++ test.c	17 Oct 2004 15:45:54 -0000	1.131
@@ -919,7 +919,8 @@
   test_assert(!is_legal_nickname_or_hexdigest("abcdefghijklmnopqrst"));
 
   get_platform_str(platform, sizeof(platform));
-
+  memset(&r1,0,sizeof(r1));
+  memset(&r2,0,sizeof(r2));
   r1.address = "testaddr1.foo.bar";
   r1.addr = 0xc0a80001u; /* 192.168.0.1 */
   r1.published_on = 0;



More information about the tor-commits mailing list