]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/cifs/cifsacl.c
tty: serial: omap-serial: wakeup latency constraint is in microseconds, not milliseconds
[karo-tx-linux.git] / fs / cifs / cifsacl.c
index 72ddf23ef6f7d77145dbe765732633ff8e588076..c1b254487388ab3a23ce4af9d1226e84a7ead901 100644 (file)
@@ -909,6 +909,8 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,
                umode_t group_mask = S_IRWXG;
                umode_t other_mask = S_IRWXU | S_IRWXG | S_IRWXO;
 
+               if (num_aces > ULONG_MAX / sizeof(struct cifs_ace *))
+                       return;
                ppace = kmalloc(num_aces * sizeof(struct cifs_ace *),
                                GFP_KERNEL);
                if (!ppace) {