aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-05-08 09:37:43 -0400
committerNick Mathewson <nickm@torproject.org>2012-05-08 09:38:56 -0400
commit98a30daf34068d629652ab070b1ef50cbe8f0733 (patch)
treed29e696fc8faef0d636958725d766b7850f6cacf /src
parent66dbbc29600992375c8fb2d18a90831e305106b0 (diff)
downloadtor-98a30daf34068d629652ab070b1ef50cbe8f0733.tar
tor-98a30daf34068d629652ab070b1ef50cbe8f0733.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/test/test_pt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test_pt.c b/src/test/test_pt.c
index 9d6aa09f0..201f78ea5 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("<testcase>");
/* various wrong protocol runs: */