https://bugs.winehq.org/show_bug.cgi?id=46481
Bug ID: 46481 Summary: strftime has a buffer overflow Product: Wine Version: 3.19 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt Assignee: wine-bugs@winehq.org Reporter: m101010a@gmail.com Distribution: ArchLinux
Created attachment 63309 --> https://bugs.winehq.org/attachment.cgi?id=63309 test-program
Steps: 1. Compile the attached program with mingw 2. Run the resulting executable
Expected outcome: The program prints a number less than 2
Actual outcome: The program prints 21 (I am in Eastern Standard Time)
This happens with both 32-bit and 64-bit executables. If the buffer size is decreased enough, this can smash the stack.