From: Charles Manning Date: Thu, 5 Jan 2012 01:47:02 +0000 (+1300) Subject: yaffs direct: Fix bounds issue in handle to pointer function X-Git-Tag: pre-driver-refactoring~39 X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=b6299aea4cb86a215e65f04fca38c2eb8b26ee16 yaffs direct: Fix bounds issue in handle to pointer function Signed-off-by: Charles Manning --- diff --git a/direct/yaffsfs.c b/direct/yaffsfs.c index 568fe1e..2b2b859 100644 --- a/direct/yaffsfs.c +++ b/direct/yaffsfs.c @@ -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; }