提交 c988fd04 编写于 作者: T Tiger Yang 提交者: Mark Fasheh

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: NTiger Yang <tiger.yang@oracle.com>
Signed-off-by: NJoel Becker <joel.becker@oracle.com>
Signed-off-by: NMark Fasheh <mfasheh@suse.com>
上级 ceb1eba3
......@@ -78,7 +78,7 @@ struct xattr_handler *ocfs2_xattr_handlers[] = {
NULL
};
static struct xattr_handler *ocfs2_xattr_handler_map[] = {
static struct xattr_handler *ocfs2_xattr_handler_map[OCFS2_XATTR_MAX] = {
[OCFS2_XATTR_INDEX_USER] = &ocfs2_xattr_user_handler,
[OCFS2_XATTR_INDEX_TRUSTED] = &ocfs2_xattr_trusted_handler,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册