From 54c310f1a15e507dfd780ba2e691103c98457521 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Wed, 27 Oct 2004 22:24:15 +0000 Subject: [PATCH] Fix off by one which oculd cause invalid handle to be used. (Logical change 1.98) git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@363 fd59a12c-fef9-0310-b244-a6a79926bd2f --- lib/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.c b/lib/util.c index 17c525aa..a673fd31 100644 --- a/lib/util.c +++ b/lib/util.c @@ -439,7 +439,7 @@ saHandleInstanceGet ( { pthread_mutex_lock (&handleDatabase->mutex); - if (handle > handleDatabase->handleCount) { + if (handle >= handleDatabase->handleCount) { return (SA_ERR_BAD_HANDLE); } if (handleDatabase->handles[handle].state != SA_HANDLE_STATE_ACTIVE) {