Commit a34150f1 authored by Petr Vandrovec's avatar Petr Vandrovec

Fix NCP_IOC_SETOBJECTNAME ioctl in ncpfs.

parent 67cba4d4
...@@ -424,7 +424,7 @@ int ncp_ioctl(struct inode *inode, struct file *filp, ...@@ -424,7 +424,7 @@ int ncp_ioctl(struct inode *inode, struct file *filp,
if (user.object_name_len) { if (user.object_name_len) {
newname = ncp_kmalloc(user.object_name_len, GFP_USER); newname = ncp_kmalloc(user.object_name_len, GFP_USER);
if (!newname) return -ENOMEM; if (!newname) return -ENOMEM;
if (copy_from_user(newname, user.object_name, sizeof(user))) { if (copy_from_user(newname, user.object_name, user.object_name_len)) {
ncp_kfree_s(newname, user.object_name_len); ncp_kfree_s(newname, user.object_name_len);
return -EFAULT; return -EFAULT;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment