fs/cifs: fix parsing of dfs referrals
The problem was that the first referral was parsed more than once
and so the caller tried the same referrals multiple times.
The problem was introduced partly by commit
066ce68994
,
where 'ref += le16_to_cpu(ref->Size);' got lost,
but that was also wrong...
Cc: <stable@vger.kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Tested-by: Björn Jacke <bj@sernet.de>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
a557b97616
commit
d8f2799b10
@ -4844,8 +4844,12 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
|
||||
max_len = data_end - temp;
|
||||
node->node_name = cifs_strndup_from_utf16(temp, max_len,
|
||||
is_unicode, nls_codepage);
|
||||
if (!node->node_name)
|
||||
if (!node->node_name) {
|
||||
rc = -ENOMEM;
|
||||
goto parse_DFS_referrals_exit;
|
||||
}
|
||||
|
||||
ref++;
|
||||
}
|
||||
|
||||
parse_DFS_referrals_exit:
|
||||
|
Loading…
Reference in New Issue
Block a user