From: Nick Mathewson Date: Tue, 8 May 2012 13:37:43 +0000 (-0400) Subject: Fix a segfault in pt/protocol test X-Git-Tag: tor-0.2.3.16-alpha~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98a30daf34068d629652ab070b1ef50cbe8f0733;p=thirdparty%2Ftor.git Fix a segfault in pt/protocol test Now that the pt code logs mp->argv[0] all over the place, we need to be sure to set up mp->argv in our tests. Bugfix on e603692adcd, not in any released version. --- diff --git a/src/test/test_pt.c b/src/test/test_pt.c index 9d6aa09f0d..201f78ea50 100644 --- a/src/test/test_pt.c +++ b/src/test/test_pt.c @@ -94,6 +94,8 @@ test_pt_protocol(void) managed_proxy_t *mp = tor_malloc_zero(sizeof(managed_proxy_t)); mp->conf_state = PT_PROTO_LAUNCHED; mp->transports = smartlist_new(); + mp->argv = tor_malloc_zero(sizeof(char*)*2); + mp->argv[0] = tor_strdup(""); /* various wrong protocol runs: */