From 3e7c8a40bca3ed5eda71e237ee79149a9d058e36 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Thu, 8 Apr 2004 03:18:03 +0000 Subject: [PATCH] bugfix: alice would crash if bob advertised 0 intro points svn:r1559 --- src/or/rendclient.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.47.3