]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: fix parsing of hostname in dfs referrals
authorJeff Layton <jlayton@redhat.com>
Tue, 30 Nov 2010 20:14:48 +0000 (15:14 -0500)
committerSteve French <sfrench@us.ibm.com>
Tue, 30 Nov 2010 20:44:05 +0000 (20:44 +0000)
commit034dabe66b82c95d227fe93d9416165b765efba9
tree05584dc9061390fedf5caa749a2f7d728324b232
parent825841bfd13e6b26673f425c7de05af001870c2a
cifs: fix parsing of hostname in dfs referrals

The DFS referral parsing code does a memchr() call to find the '\\'
delimiter that separates the hostname in the referral UNC from the
sharename. It then uses that value to set the length of the hostname via
pointer subtraction.  Instead of subtracting the start of the hostname
however, it subtracts the start of the UNC, which causes the code to
pass in a hostname length that is 2 bytes too long.

Regression introduced in commit 14fb6b82.

Reported-and-Tested-by: Robbert Kouprie <robbert@exx.nl>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: Wang Lei <wang840925@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/dns_resolve.c