aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/cifsacl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index 72ddf23ef6f7..c1b254487388 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -909,6 +909,8 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,
909 umode_t group_mask = S_IRWXG; 909 umode_t group_mask = S_IRWXG;
910 umode_t other_mask = S_IRWXU | S_IRWXG | S_IRWXO; 910 umode_t other_mask = S_IRWXU | S_IRWXG | S_IRWXO;
911 911
912 if (num_aces > ULONG_MAX / sizeof(struct cifs_ace *))
913 return;
912 ppace = kmalloc(num_aces * sizeof(struct cifs_ace *), 914 ppace = kmalloc(num_aces * sizeof(struct cifs_ace *),
913 GFP_KERNEL); 915 GFP_KERNEL);
914 if (!ppace) { 916 if (!ppace) {