Commit 85d93d68 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ntdll: Fix the FileNameInformation info size.

parent 4422e671
......@@ -1551,7 +1551,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
sizeof(FILE_INTERNAL_INFORMATION), /* FileInternalInformation */
sizeof(FILE_EA_INFORMATION), /* FileEaInformation */
sizeof(FILE_ACCESS_INFORMATION), /* FileAccessInformation */
sizeof(FILE_NAME_INFORMATION)-sizeof(WCHAR), /* FileNameInformation */
sizeof(FILE_NAME_INFORMATION), /* FileNameInformation */
sizeof(FILE_RENAME_INFORMATION)-sizeof(WCHAR), /* FileRenameInformation */
0, /* FileLinkInformation */
sizeof(FILE_NAMES_INFORMATION)-sizeof(WCHAR), /* FileNamesInformation */
......
......@@ -977,6 +977,9 @@ static void test_file_name_information(void)
NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0 );
ok(h != INVALID_HANDLE_VALUE, "Failed to open file.\n");
hr = pNtQueryInformationFile( h, &io, info, sizeof(*info) - 1, FileNameInformation );
ok(hr == STATUS_INFO_LENGTH_MISMATCH, "NtQueryInformationFile returned %#x.\n", hr);
memset( info, 0xcc, info_size );
hr = pNtQueryInformationFile( h, &io, info, sizeof(*info), FileNameInformation );
ok(hr == STATUS_BUFFER_OVERFLOW, "NtQueryInformationFile returned %#x, expected %#x.\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment