summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2021-04-20 22:34:23 +0200
committerDirk Engling <erdgeist@erdgeist.org>2021-04-20 22:34:23 +0200
commit27f8189d845779a37b008b2927d81faad3dd4c96 (patch)
treedc44e7001bad619ffc886e65fab5f0f6134f8550
parent58dedd001d02f313025230d7730730d29af2f15e (diff)
accesslist checker should not operate on an empty list
-rw-r--r--ot_accesslist.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ot_accesslist.c b/ot_accesslist.c
index 48de873..921bde3 100644
--- a/ot_accesslist.c
+++ b/ot_accesslist.c
@@ -116,7 +116,10 @@ int accesslist_hashisvalid( ot_hash hash ) {
116 /* Get working copy of current access list */ 116 /* Get working copy of current access list */
117 ot_accesslist * accesslist = g_accesslist; 117 ot_accesslist * accesslist = g_accesslist;
118 118
119 void * exactmatch = bsearch( hash, accesslist->list, accesslist->size, OT_HASH_COMPARE_SIZE, vector_compare_hash ); 119 void * exactmatch = NULL;
120
121 if (accesslist)
122 bsearch( hash, accesslist->list, accesslist->size, OT_HASH_COMPARE_SIZE, vector_compare_hash );
120 123
121#ifdef WANT_ACCESSLIST_BLACK 124#ifdef WANT_ACCESSLIST_BLACK
122 return exactmatch == NULL; 125 return exactmatch == NULL;