yaffs direct: Fix bounds issue in handle to pointer function
[yaffs2.git] / direct / yaffsfs.c
index 568fe1efbd98182ba937a786600cce2ca0ec75d9..2b2b8593422466736b82c20d5ccd8fb534bf2c57 100644 (file)
@@ -124,7 +124,7 @@ static void yaffsfs_InitHandles(void)
 
 static yaffsfs_Handle *yaffsfs_HandleToPointer(int h)
 {
-       if(h >= 0 && h <= YAFFSFS_N_HANDLES)
+       if(h >= 0 && h < YAFFSFS_N_HANDLES)
                return &yaffsfs_handle[h];
        return NULL;
 }