https://bugs.winehq.org/show_bug.cgi?id=56573
Bug ID: 56573 Summary: CopyFile arbitrarily sets read-only attribute on destination file. Product: Wine-staging Version: 9.6 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: kreudom@gmail.com CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ---
Created attachment 76326 --> https://bugs.winehq.org/attachment.cgi?id=76326 proposed patch
When using one of the CopyFile functions, the destination file is arbitrarily set to read-only. This occurs due to an uninitialized read introduced in the kernel32-CopyFileEx patch. The attribute is set depending on an uninitialized bit.
This bug was likely accidentally introduced in the rebase eedc72d581e5de3e87cd21519f3b5767a35b8b2c.
Expected behavior: the attribute should be set depending on the attribute of the source file.
See the attached patch for my proposed fix.