1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

dfs_server: Use multi-byte string handling

Pre-empt a bug with multi-byte DFS pathname handling by using strchr_m()

Signed-off-by: Robin McCorkell <rmccorkell@karoshi.org.uk>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jul 10 20:35:47 CEST 2015 on sn-devel-104
This commit is contained in:
Robin McCorkell 2015-07-09 21:20:13 +01:00 committed by Volker Lendecke
parent aeb4ba1801
commit 46ea8b5928

View File

@ -833,12 +833,12 @@ NTSTATUS dfs_server_ad_get_referrals(struct loadparm_context *lp_ctx,
server_name++; server_name++;
} }
dfs_name = strchr(server_name, path_separator); dfs_name = strchr_m(server_name, path_separator);
if (dfs_name != NULL) { if (dfs_name != NULL) {
dfs_name[0] = '\0'; dfs_name[0] = '\0';
dfs_name++; dfs_name++;
link_path = strchr(dfs_name, path_separator); link_path = strchr_m(dfs_name, path_separator);
if (link_path != NULL) { if (link_path != NULL) {
link_path[0] = '\0'; link_path[0] = '\0';
link_path++; link_path++;