提交 8005aba6 编写于 作者: D David S. Miller

[SPARC64]: Fix cmsg length checks in Solaris emulation layer.

Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1d345dac
......@@ -317,8 +317,10 @@ asmlinkage int solaris_sendmsg(int fd, struct sol_nmsghdr __user *user_msg, unsi
unsigned long *kcmsg;
compat_size_t cmlen;
if(kern_msg.msg_controllen > sizeof(ctl) &&
kern_msg.msg_controllen <= 256) {
if (kern_msg.msg_controllen <= sizeof(compat_size_t))
return -EINVAL;
if(kern_msg.msg_controllen > sizeof(ctl)) {
err = -ENOBUFS;
ctl_buf = kmalloc(kern_msg.msg_controllen, GFP_KERNEL);
if(!ctl_buf)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册