dll: relative symbolic link resolution testing

This commit is contained in:
Bill Zissimopoulos
2016-09-12 21:50:25 -07:00
parent 5888e9ab05
commit ccec269dd6
2 changed files with 4 additions and 4 deletions

View File

@ -1181,14 +1181,14 @@ FSP_API NTSTATUS FspFileSystemResolveReparsePoints(FSP_FILE_SYSTEM *FileSystem,
ReparseTargetPathLength >= sizeof(WCHAR) && L'\\' == ReparseTargetPath[0])
goto reparse_data_exit;
if (0 == --MaxTries)
return STATUS_REPARSE_POINT_NOT_RESOLVED;
/* if device relative symlink replace whole path; else replace last path component */
NewRemainderPath = ReparseTargetPathLength >= sizeof(WCHAR) && L'\\' == ReparseTargetPath[0] ?
TargetPath : LastPathComponent;
reparse:
if (0 == --MaxTries)
return STATUS_REPARSE_POINT_NOT_RESOLVED;
RemainderPathSize = (lstrlenW(RemainderPath) + 1) * sizeof(WCHAR);
if (NewRemainderPath + (ReparseTargetPathLength + RemainderPathSize) / sizeof(WCHAR) >
TargetPath + *PSize / sizeof(WCHAR))