WSAStartup16 seems wrong. As I understand it all the Win16 structures have a 1 byte alignment. Thus the WSASTARTUP structure used by WSAStartup16 should have a 1 byte alignment. But WSAStartup16 uses the Win32 structure! Why is this important? Here's why: - the last field, lpVendorInfo, will be misaligned - the structure will be larger than it should (by 2 bytes). And since we do a memcpy of sizeof(WSADATA) to the pointer provided by the application we could have a buffer overflow - this creates a dependency between winsock16.h and winsock.h which greatly bothers me
Or did I miss something?
Changelog:
* include/wine/winsock16.h, dlls/winsock/socket.c
Add WSASTARTUP16 a 1 byte alignment version of WSASTARTUP for win16
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ Any sufficiently advanced Operating System is indistinguishable from Linux