]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.fixes/ocfs2-add-handler_map-array-bounds-checking.patch
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / ocfs2-add-handler_map-array-bounds-checking.patch
CommitLineData
00e5a55c
BS
1From: Tiger Yang <tiger.yang@oracle.com>
2Date: Thu, 23 Oct 2008 16:34:44 +0800
3Subject: ocfs2: add handler_map array bounds checking
4
5Make the handler_map array as large as the possible value range to avoid
6a fencepost error.
7
8[ Utilize alternate method -- Joel ]
9
10Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
11Signed-off-by: Joel Becker <joel.becker@oracle.com>
12Signed-off-by: Mark Fasheh <mfasheh@suse.com>
13---
14 fs/ocfs2/xattr.c | 2 +-
15 1 files changed, 1 insertions(+), 1 deletions(-)
16
17Index: linux-2.6.27-ocfs2/fs/ocfs2/xattr.c
18===================================================================
19--- linux-2.6.27-ocfs2.orig/fs/ocfs2/xattr.c
20+++ linux-2.6.27-ocfs2/fs/ocfs2/xattr.c
21@@ -78,7 +78,7 @@ struct xattr_handler *ocfs2_xattr_handle
22 NULL
23 };
24
25-static struct xattr_handler *ocfs2_xattr_handler_map[] = {
26+static struct xattr_handler *ocfs2_xattr_handler_map[OCFS2_XATTR_MAX] = {
27 [OCFS2_XATTR_INDEX_USER] = &ocfs2_xattr_user_handler,
28 [OCFS2_XATTR_INDEX_TRUSTED] = &ocfs2_xattr_trusted_handler,
29 };