yaffs direct: Fix bounds issue in handle to pointer function
authorCharles Manning <cdhmanning@gmail.com>
Thu, 5 Jan 2012 01:47:02 +0000 (14:47 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Thu, 5 Jan 2012 01:47:02 +0000 (14:47 +1300)
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
direct/yaffsfs.c

index 568fe1e..2b2b859 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;
 }