Fix InternetGetConnectedStateExA To Not Crash
Robert Shearman
rob at codeweavers.com
Fri Nov 19 15:20:25 CST 2004
Hi,
Currently, InternetGetConnectedStateExA could crash because
InternetGetConnectedStateExW does not fill in the buffer, and
WideCharToMultiByte tries to measure the length of the string. If there
is not a NULL before the next unreadable page boundary, this will crash.
This patch fixes InternetGetConnectedStateExW to return the string
received if you are connected to a LAN (as opposed to dial-up or not
connected to any network). It also fixes the debug trace so that it
doesn't print garbage.
Rob
Changelog:
- Make InternetGetConnectedStateExA not crash, by making
InternetGetConnectedStateExW fill in the buffer correctly.
- Remove the dumping of strings that will only contain garbage.
- Document function.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getconnectedstate.diff
Type: text/x-patch
Size: 4576 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20041119/3e48a814/getconnectedstate.bin
More information about the wine-patches
mailing list