cifs: prevent possible memory corruption in cifs_demultiplex_thread
authorJeff Layton <jlayton@redhat.com>
Fri, 3 Sep 2010 16:00:50 +0000 (12:00 -0400)
committerSteve French <sfrench@us.ibm.com>
Wed, 8 Sep 2010 21:22:35 +0000 (21:22 +0000)
cifs_demultiplex_thread sets the addr.sockAddr.sin_port without any
regard for the socket family. While it may be that the error in question
here never occurs on an IPv6 socket, it's probably best to be safe and
set the port properly if it ever does.

Break the port setting code out of cifs_fill_sockaddr and into a new
function, and call that from cifs_demultiplex_thread.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>

No differences found