diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/smb_server/smb/nttrans.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c index 03f5f398fe..3d898ba1a7 100644 --- a/source4/smb_server/smb/nttrans.c +++ b/source4/smb_server/smb/nttrans.c @@ -136,8 +136,8 @@ static NTSTATUS nttrans_create(struct smbsrv_request *req, io->ntcreatex.in.ea_list = NULL; req_pull_string(req, &io->ntcreatex.in.fname, - params + 54, - trans->in.params.length - 54, + params + 53, + MIN(fname_len+1, trans->in.params.length - 53), STR_NO_RANGE_CHECK | STR_TERMINATE); if (!io->ntcreatex.in.fname) { return NT_STATUS_INVALID_PARAMETER; |