diff options
author | Tiger Yang <tiger.yang@oracle.com> | 2008-10-23 04:34:44 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-11-10 12:51:44 -0500 |
commit | c988fd045f1195e62c0970384903ab9da26a9359 (patch) | |
tree | 0777e42068fdb604a0fe92407f6c999b529354f1 /fs | |
parent | ceb1eba3dc2ad94b25764785ff7d2082c6094115 (diff) |
ocfs2: add handler_map array bounds checking
Make the handler_map array as large as the possible value range to avoid
a fencepost error.
[ Utilize alternate method -- Joel ]
Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/xattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index a9da45bbb9e..e19980a71a3 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c | |||
@@ -78,7 +78,7 @@ struct xattr_handler *ocfs2_xattr_handlers[] = { | |||
78 | NULL | 78 | NULL |
79 | }; | 79 | }; |
80 | 80 | ||
81 | static struct xattr_handler *ocfs2_xattr_handler_map[] = { | 81 | static struct xattr_handler *ocfs2_xattr_handler_map[OCFS2_XATTR_MAX] = { |
82 | [OCFS2_XATTR_INDEX_USER] = &ocfs2_xattr_user_handler, | 82 | [OCFS2_XATTR_INDEX_USER] = &ocfs2_xattr_user_handler, |
83 | [OCFS2_XATTR_INDEX_TRUSTED] = &ocfs2_xattr_trusted_handler, | 83 | [OCFS2_XATTR_INDEX_TRUSTED] = &ocfs2_xattr_trusted_handler, |
84 | }; | 84 | }; |