]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: make sure we allocate enough storage for socket address
authorJeff Layton <jlayton@redhat.com>
Thu, 22 Jan 2009 19:43:21 +0000 (14:43 -0500)
committerSteve French <sfrench@us.ibm.com>
Thu, 29 Jan 2009 03:32:13 +0000 (03:32 +0000)
commit64a373647dd6493d9f53e09a43f29536a249eda3
treecf170dfaff4b5559eb814806e5cfb573f3e4be93
parentb8b5ccb0ea9bd72b4b107371c688d82457d3dfc3
cifs: make sure we allocate enough storage for socket address

The sockaddr declared on the stack in cifs_get_tcp_session is too small
for IPv6 addresses. Change it from "struct sockaddr" to "struct
sockaddr_storage" to prevent stack corruption when IPv6 is used.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/connect.c