16 May
2025
16 May
'25
9:41 a.m.
1. Changed fixed-size buffer to dynamic allocation for link_name to prevent buffer overflow 2. Added proper memory cleanup with HeapFree in all error paths 3. Fixed potential null pointer dereference when device is NULL 4. Improved error handling by checking memory allocation success The original code used a fixed-size buffer (15 chars) which could overflow with long device names. The new version dynamically allocates memory based on actual device name length, includes proper cleanup, and handles edge cases better. Signed-off-by: Wei Xie <xiewei(a)uniontech.com> -- v3: kernel32/tests: add missing DefineDosDeviceW test cases https://gitlab.winehq.org/wine/wine/-/merge_requests/8041