diff options
author | Roger Dingledine <arma@torproject.org> | 2004-04-08 03:18:03 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-04-08 03:18:03 +0000 |
commit | 3e7c8a40bca3ed5eda71e237ee79149a9d058e36 (patch) | |
tree | 6b108bb62c79200f9be68e9503445e7713948232 /src/or/rendclient.c | |
parent | 024c059fae2eb7bab2bc8b50cc7b5afccae34916 (diff) | |
download | tor-3e7c8a40bca3ed5eda71e237ee79149a9d058e36.tar.gz tor-3e7c8a40bca3ed5eda71e237ee79149a9d058e36.zip |
bugfix: alice would crash if bob advertised 0 intro points
svn:r1559
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 540fa2b3f8..aa32ead26f 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -284,6 +284,10 @@ char *rend_client_get_random_intro(char *query) { smartlist_add(sl,entry->parsed->intro_points[i]); choice = smartlist_choose(sl); + if(!choice) { + smartlist_free(sl); + return NULL; + } nickname = tor_strdup(choice); smartlist_free(sl); return nickname; |