]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/dccp/proto.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / net / dccp / proto.c
index b622d9744856a9e8320f812cb9e9d85699f1a6a0..1ca3b26eed0fb09c479d4e513efd2d185c69bcc0 100644 (file)
@@ -474,6 +474,11 @@ static int dccp_setsockopt_change(struct sock *sk, int type,
 
        if (copy_from_user(&opt, optval, sizeof(opt)))
                return -EFAULT;
+       /*
+        * rfc4340: 6.1. Change Options
+        */
+       if (opt.dccpsf_len < 1)
+               return -EINVAL;
 
        val = kmalloc(opt.dccpsf_len, GFP_KERNEL);
        if (!val)