Alexandre Julliard (@julliard) commented about programs/cmd/directory.c:
- WCHAR *path;
- DWORD size;
- BOOL ret;
- PathAllocCombine(dir, filename, PATHCCH_ALLOW_LONG_PATHS, &path);
- file = CreateFileW(path, GENERIC_READ, 0, NULL, OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL);- if (file == INVALID_HANDLE_VALUE)
- {
WARN("failed to open %s, error %lu\n", debugstr_w(path), GetLastError());LocalFree(path);return;- }
- data = malloc(1024);
- ret = DeviceIoControl(file, FSCTL_GET_REPARSE_POINT, NULL, 0, data, 1024, &size, NULL);
This could also use a MAXIMUM_REPARSE_DATA_BUFFER_SIZE buffer.