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.
https://bugs.winehq.org/show_bug.cgi?id=56573
Dominik Kreutzer kreudom@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch, regression Regression SHA1| |eedc72d581e5de3e87cd21519f3 | |b5767a35b8b2c
https://bugs.winehq.org/show_bug.cgi?id=56573
--- Comment #1 from Ken Sharp imwellcushtymelike@gmail.com --- Are you saying this is specific to Wine Staging or does vanilla Wine exhibit the same behaviour?
https://bugs.winehq.org/show_bug.cgi?id=56573
--- Comment #2 from Dominik Kreutzer kreudom@gmail.com --- The bug is only in Wine Staging. It is specifically a bug in the code of the mentioned staging patch.
https://bugs.winehq.org/show_bug.cgi?id=56573
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #3 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Thanks.
Fixed by https://gitlab.winehq.org/wine/wine-staging/-/commit/054ecfb60a18acfafa1db36...
https://bugs.winehq.org/show_bug.cgi?id=56573
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Fixed wine-staging bug.