diff options
Diffstat (limited to 'trust/index.c')
-rw-r--r-- | trust/index.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/trust/index.c b/trust/index.c index 6e9a46c..1275cd9 100644 --- a/trust/index.c +++ b/trust/index.c @@ -648,7 +648,7 @@ index_select (p11_index *index, for (j = 1; j < num; j++) { assert (buckets[j]->elem); /* checked above */ at = binary_search (buckets[j]->elem, 0, buckets[j]->num, handle); - if (buckets[j]->elem[at] != handle) { + if (at >= buckets[j]->num || buckets[j]->elem[at] != handle) { handle = 0; break; } |