[Bluetooth] Fix L2CAP configuration parameter handling
[pandora-kernel.git] / net / netlink / attr.c
index 0041395..df5f820 100644 (file)
@@ -67,6 +67,11 @@ static int validate_nla(struct nlattr *nla, int maxtype,
                }
                break;
 
+       case NLA_BINARY:
+               if (pt->len && attrlen > pt->len)
+                       return -ERANGE;
+               break;
+
        default:
                if (pt->len)
                        minlen = pt->len;