mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 23:33:24 +08:00
[KERNEL32] FindFirstFileExW: fix syscall buffer alignment
NtQueryDirectoryFile required the FileInformation buffer to be ULONG-aligned. Declare the aligned buffer explicitly.
This commit is contained in:
@@ -687,9 +687,10 @@ FindFirstFileExW(IN LPCWSTR lpFileName,
|
||||
/*
|
||||
* May represent many FILE_BOTH_DIR_INFORMATION
|
||||
* or many FILE_FULL_DIR_INFORMATION structures.
|
||||
* NOTE: NtQueryDirectoryFile requires the buffer to be ULONG-aligned
|
||||
*/
|
||||
BYTE DirectoryInfo[FIND_DATA_SIZE];
|
||||
DIR_INFORMATION DirInfo = {&DirectoryInfo};
|
||||
DECLSPEC_ALIGN(4) BYTE DirectoryInfo[FIND_DATA_SIZE];
|
||||
DIR_INFORMATION DirInfo = { .DirInfo = &DirectoryInfo };
|
||||
|
||||
/* The search filter is always unused */
|
||||
if (lpSearchFilter)
|
||||
|
||||
Reference in New Issue
Block a user