Commit 0c68742b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] NCPFS memleak fix

Patch from Petr Vandrovec <vandrove@vc.cvut.cz>
Reported by Oleg Drokin.

    In NCP_IOC_SETOBJECTNAME handler, we allocated space (newname pointer),
    copy stuff from userspace to there and then assign userspace
    pointer to our internal structure, whoops!
parent 3028439e
......@@ -440,7 +440,7 @@ int ncp_ioctl(struct inode *inode, struct file *filp,
oldprivatelen = server->priv.len;
server->auth.auth_type = user.auth_type;
server->auth.object_name_len = user.object_name_len;
server->auth.object_name = user.object_name;
server->auth.object_name = newname;
server->priv.len = 0;
server->priv.data = NULL;
/* leave critical section */
......
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