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
This commit is contained in:
Steven Dake 2004-10-27 22:24:15 +00:00
parent 0c666cff56
commit 54c310f1a1

View File

@ -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) {