summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libsmb/clidfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index c6fe67f16a..957bf4d707 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -738,7 +738,8 @@ NTSTATUS cli_dfs_get_referral(TALLOC_CTX *ctx,
clistr_pull_talloc(ctx, cli->inbuf,
SVAL(cli->inbuf, smb_flg2),
&referrals[i].dfspath,
- p+node_offset, -1,
+ p+node_offset,
+ cli->bufsize - ((p+node_offset)-cli->inbuf),
STR_TERMINATE|STR_UNICODE);
if (!referrals[i].dfspath) {