Vishnunithyasoundhar S (@svishnunithyasoundhar) commented about dlls/ntoskrnl.exe/ntoskrnl.c:
return STATUS_NOT_IMPLEMENTED; }
+/*********************************************************************** + * FsRtlGetFileSize (NTOSKRNL.EXE.@) + */ +NTSTATUS WINAPI FsRtlGetFileSize( PFILE_OBJECT file_obj, PLARGE_INTEGER file_size ) +{ + FILE_STANDARD_INFORMATION info; + IO_STATUS_BLOCK iosb; + NTSTATUS status; + HANDLE handle; + + TRACE( "file_obj %p, file_size %p\n", file_obj, file_size ); + + status = ObOpenObjectByPointer( file_obj, 0, NULL, 0, IoFileObjectType, KernelMode, &handle );
I think it would be good if you have a basic check to see if `file_obj` is a null pointer before dereferencing it. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10247#note_131380