From 762a721f7f544f2428111f70f4d388f2d4134a55 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 23 Feb 2012 15:57:15 +0000 Subject: Fix buffer overrun crash running MSVC2010 win32 Qt on win64 When loading dnsapi.dll as a plugin, we experience crashes because the calling convention is not specified. The default is _cdecl, but __stdcall (via the WINAPI macro) should be used for windows APIs. Mismatched calling convention results in corruption of local variables, probably because the stack pointer is incorrect and SP offsets are used in optimised builds rather than frame pointer offsets. Since the library has been available since Windows 2000, I don't think that we need to load it dynamically. (Unlike the unix version where it isn't part of the LSB) Also checked that the current release of mingw works. Task-number: QTBUG-24227 Change-Id: I37c0a6aa0c133799c2a6dd9391ca1435ba2539ea Reviewed-by: Friedemann Kleint --- src/network/kernel/kernel.pri | 1 + 1 file changed, 1 insertion(+) (limited to 'src/network/kernel/kernel.pri') diff --git a/src/network/kernel/kernel.pri b/src/network/kernel/kernel.pri index adc72bbcbb..a5508af31f 100644 --- a/src/network/kernel/kernel.pri +++ b/src/network/kernel/kernel.pri @@ -29,6 +29,7 @@ unix:SOURCES += kernel/qdnslookup_unix.cpp kernel/qhostinfo_unix.cpp kernel/qnet win32: { HEADERS += kernel/qnetworkinterface_win_p.h SOURCES += kernel/qdnslookup_win.cpp kernel/qhostinfo_win.cpp kernel/qnetworkinterface_win.cpp + LIBS += -ldnsapi } integrity:SOURCES += kernel/qdnslookup_unix.cpp kernel/qhostinfo_unix.cpp kernel/qnetworkinterface_unix.cpp -- cgit v1.2.3