http://bugs.winehq.org/show_bug.cgi?id=59643 Bug ID: 59643 Summary: SHCreateStreamOnFileW (IStream::Seek) truncates 64-bit offsets to 32-bit, breaking >4GB file reads Product: Wine Version: 10.19 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: shlwapi Assignee: wine-bugs@list.winehq.org Reporter: thistastesugly@gmail.com Distribution: --- Created attachment 80733 --> http://bugs.winehq.org/attachment.cgi?id=80733 minimal C++ Proof of Concept When using SHCreateStreamOnFileW to obtain an IStream for a file larger than 4GB, the IStream::Seek method incorrectly truncates 64-bit offsets (LARGE_INTEGER) to 32-bit values. This breaks applications that rely on shlwapi streams to parse large files. Steps to Reproduce: Create a dummy file larger than 4GB (e.g., 5GB). Use SHCreateStreamOnFileW to open it. Call IStream::Stat (This correctly reports the 64-bit size). Call IStream::Seek to an offset past 4GB (e.g., 4294968320 / 0x100000400). Observe the new position returned by Seek. Expected Results (Windows Native): Plaintext [*] Attempting to open: dummy_5gb.bin [+] SHCreateStreamOnFileW succeeded. [+] IStream::Stat size: 5331951616 bytes [*] Seeking to offset: 4294968320 [+] Seek succeeded. New position reported: 4294968320 Actual Results (Wine): Plaintext [*] Attempting to open: dummy_5gb.bin [+] SHCreateStreamOnFileW succeeded. [+] IStream::Stat size: 5331951616 bytes [*] Seeking to offset: 4294968320 [+] Seek succeeded. New position reported: 1024 Note that 4294968320 (0x100000400) truncated to 32 bits is exactly 1024 (0x400). compiled on "x64 Native Tools Command Prompt for VS 2022" using "cl.exe /MD stream_test.cpp" -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.