mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
parent
01d9fa1719
commit
b62e1e920b
@ -1939,7 +1939,7 @@ int fsp_fuse_intf_AddDirInfo(void *buf, const char *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
SizeA = lstrlenA(name);
|
SizeA = lstrlenA(name);
|
||||||
if (SizeA > 255)
|
if (SizeA > 1020)
|
||||||
{
|
{
|
||||||
fsp_fuse_intf_LogBadDirInfo(filedesc->PosixPath, name,
|
fsp_fuse_intf_LogBadDirInfo(filedesc->PosixPath, name,
|
||||||
"too long");
|
"too long");
|
||||||
@ -1953,6 +1953,15 @@ int fsp_fuse_intf_AddDirInfo(void *buf, const char *name,
|
|||||||
"MultiByteToWideChar failed");
|
"MultiByteToWideChar failed");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
else if (255 == SizeW)
|
||||||
|
{
|
||||||
|
if (255 < MultiByteToWideChar(CP_UTF8, 0, name, SizeA, NULL, 0))
|
||||||
|
{
|
||||||
|
fsp_fuse_intf_LogBadDirInfo(filedesc->PosixPath, name,
|
||||||
|
"too long");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
memset(DirInfo, 0, sizeof *DirInfo);
|
memset(DirInfo, 0, sizeof *DirInfo);
|
||||||
DirInfo->Size = (UINT16)(sizeof(FSP_FSCTL_DIR_INFO) + SizeW * sizeof(WCHAR));
|
DirInfo->Size = (UINT16)(sizeof(FSP_FSCTL_DIR_INFO) + SizeW * sizeof(WCHAR));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user