From: Stefan Metzmacher Date: Tue, 30 Jun 2009 11:25:21 +0000 (+0200) Subject: s3:smbd: allow the offset to the path being 0 in SMB2 create X-Git-Tag: talloc-2.0.0~815 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99c1e4f19af9fd88c0cbb19b754c85d2aec2b99c;p=thirdparty%2Fsamba.git s3:smbd: allow the offset to the path being 0 in SMB2 create metze --- diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 578dfa7c3b5..2c790775072 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -88,7 +88,9 @@ NTSTATUS smbd_smb2_request_process_create(struct smbd_smb2_request *req) in_name_offset = SVAL(inbody, 0x2C); in_name_length = SVAL(inbody, 0x2E); - if (in_name_offset != (SMB2_HDR_BODY + (body_size & 0xFFFFFFFE))) { + if (in_name_offset == 0 && in_name_length == 0) { + /* This is ok */ + } else if (in_name_offset != (SMB2_HDR_BODY + (body_size & 0xFFFFFFFE))) { return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER); }