mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
sys: create: do FspFsvolCreatePostClose when normalized name check fails
This commit is contained in:
parent
51833751d0
commit
eb0816db56
@ -823,7 +823,10 @@ NTSTATUS FspFsvolCreateComplete(
|
|||||||
|
|
||||||
if (Response->Buffer + Response->Rsp.Create.Opened.FileName.Size >
|
if (Response->Buffer + Response->Rsp.Create.Opened.FileName.Size >
|
||||||
(PUINT8)Response + Response->Size)
|
(PUINT8)Response + Response->Size)
|
||||||
|
{
|
||||||
|
FspFsvolCreatePostClose(FileDesc);
|
||||||
FSP_RETURN(Result = STATUS_OBJECT_NAME_INVALID);
|
FSP_RETURN(Result = STATUS_OBJECT_NAME_INVALID);
|
||||||
|
}
|
||||||
|
|
||||||
NormalizedName.Length = NormalizedName.MaximumLength =
|
NormalizedName.Length = NormalizedName.MaximumLength =
|
||||||
Response->Rsp.Create.Opened.FileName.Size;
|
Response->Rsp.Create.Opened.FileName.Size;
|
||||||
@ -831,7 +834,10 @@ NTSTATUS FspFsvolCreateComplete(
|
|||||||
|
|
||||||
/* normalized file name can only differ in case from requested one */
|
/* normalized file name can only differ in case from requested one */
|
||||||
if (0 != FspFileNameCompare(&FileNode->FileName, &NormalizedName, TRUE, 0))
|
if (0 != FspFileNameCompare(&FileNode->FileName, &NormalizedName, TRUE, 0))
|
||||||
|
{
|
||||||
|
FspFsvolCreatePostClose(FileDesc);
|
||||||
FSP_RETURN(Result = STATUS_OBJECT_NAME_INVALID);
|
FSP_RETURN(Result = STATUS_OBJECT_NAME_INVALID);
|
||||||
|
}
|
||||||
|
|
||||||
ASSERT(FileNode->FileName.Length == NormalizedName.Length);
|
ASSERT(FileNode->FileName.Length == NormalizedName.Length);
|
||||||
RtlCopyMemory(FileNode->FileName.Buffer, NormalizedName.Buffer, NormalizedName.Length);
|
RtlCopyMemory(FileNode->FileName.Buffer, NormalizedName.Buffer, NormalizedName.Length);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user