• Jeff Layton's avatar
    cifs: fix parsing of hostname in dfs referrals · ba038648
    Jeff Layton authored
    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 1a4240f4.
    Reported-and-Tested-by: default avatarRobbert Kouprie <robbert@exx.nl>
    Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
    Cc: Wang Lei <wang840925@gmail.com>
    Cc: David Howells <dhowells@redhat.com>
    Cc: stable@kernel.org
    Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
    ba038648
dns_resolve.c 2.8 KB