From 0fa698d84fc6f3f6b71ecb1a7b9acb8de7e0d16a Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 16 Nov 2008 18:25:20 +0000 Subject: [PATCH] apply sebastian's bug 867 fix: make routerset_equal() work as documented with NULL arguments svn:r17287 --- ChangeLog | 4 +++- src/or/routerlist.c | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cc68082edb..b99d5ed06e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,7 +11,9 @@ Changes in version 0.2.1.8-alpha - 2008-??-?? - Made Tor a little less aggressive about deleting expired certificates. Partial fix for bug 854. - Stop doing unaligned memory access that generated bus errors on - sparc64. Fix for bug 862. + sparc64. Bugfix on 0.2.0.10-alpha. Fix for bug 862. + - Fix a crash bug when changing ExcludeNodes from the controller. Bugfix + on 0.2.1.6-alpha. Fix for bug 867. Patched by Sebastian. o Minor features (controller): - Return circuit purposes in response to GETINFO circuit-status. Fixes diff --git a/src/or/routerlist.c b/src/or/routerlist.c index a46f0fb675..48e66ed8db 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -5100,6 +5100,11 @@ routerset_to_string(const routerset_t *set) int routerset_equal(const routerset_t *old, const routerset_t *new) { + if (old == NULL && new == NULL) + return 1; + else if (old == NULL || new == NULL) + return 0; + if (smartlist_len(old->list) != smartlist_len(new->list)) return 0;