From b3132be8199a2d7d3aaa24ba243d48dbab4d2bbd Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Fri, 18 Mar 2022 15:59:04 +0300 Subject: [PATCH] kernelbase: Query FileStandardInformation instead of FileEndOfFileInformation in SetFilePointerEx(). Signed-off-by: Paul Gofman Signed-off-by: Alexandre Julliard --- dlls/kernelbase/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index a3a4b4f480b..1662db55cc1 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -3621,7 +3621,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetFilePointerEx( HANDLE file, LARGE_INTEGER dista LONGLONG pos; IO_STATUS_BLOCK io; FILE_POSITION_INFORMATION info; - FILE_END_OF_FILE_INFORMATION eof; + FILE_STANDARD_INFORMATION eof; switch(method) { @@ -3634,7 +3634,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetFilePointerEx( HANDLE file, LARGE_INTEGER dista pos = info.CurrentByteOffset.QuadPart + distance.QuadPart; break; case FILE_END: - if (NtQueryInformationFile( file, &io, &eof, sizeof(eof), FileEndOfFileInformation )) + if (NtQueryInformationFile( file, &io, &eof, sizeof(eof), FileStandardInformation )) goto error; pos = eof.EndOfFile.QuadPart + distance.QuadPart; break;