aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/linux-2.6/xfs_acl.c
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2012-01-15 08:35:28 +0100
committerBjørn Mork <bjorn@mork.no>2012-01-15 08:35:28 +0100
commit6528209ba2c94f3a0ef946b7d808d9a15b30ec50 (patch)
treec3c1b8bcf8ae19f411c53c2f199f923742bcc256 /fs/xfs/linux-2.6/xfs_acl.c
parenta056fb3687c40b8a1123de1586f491285cb5fb1f (diff)
parentf2ab2a127d480ee20caf8620440ccf13c014447a (diff)
Merge remote branch 'stable/linux-2.6.32.y' into 2.6.32-mantismedia/2.6.32-mantis
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_acl.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_acl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/linux-2.6/xfs_acl.c b/fs/xfs/linux-2.6/xfs_acl.c
index 4c7b1450371..ad60d619312 100644
--- a/fs/xfs/linux-2.6/xfs_acl.c
+++ b/fs/xfs/linux-2.6/xfs_acl.c
@@ -37,9 +37,11 @@ xfs_acl_from_disk(struct xfs_acl *aclp)
struct posix_acl_entry *acl_e;
struct posix_acl *acl;
struct xfs_acl_entry *ace;
- int count, i;
+ unsigned int count, i;
count = be32_to_cpu(aclp->acl_cnt);
+ if (count > XFS_ACL_MAX_ENTRIES)
+ return ERR_PTR(-EFSCORRUPTED);
acl = posix_acl_alloc(count, GFP_KERNEL);
if (!acl)