Author: tkreuzer
Date: Sun Feb 17 19:08:39 2013
New Revision: 58340
URL:
http://svn.reactos.org/svn/reactos?rev=58340&view=rev
Log:
[WLANCONF]
Fix a bug, I introduced.
Modified:
trunk/reactos/base/applications/network/wlanconf/wlanconf.c
Modified: trunk/reactos/base/applications/network/wlanconf/wlanconf.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/wlanconf/wlanconf.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/wlanconf/wlanconf.c [iso-8859-1] Sun Feb 17
19:08:39 2013
@@ -562,6 +562,7 @@
BOOL
WlanConnect(HANDLE hAdapter)
{
+ CHAR SsidBuffer[NDIS_802_11_LENGTH_SSID + 1];
BOOL bSuccess;
DWORD dwBytesReturned, SetOidSize;
PNDISUIO_SET_OID SetOid;
@@ -706,8 +707,9 @@
SetOid->Oid = OID_802_11_SSID;
Ssid = (PNDIS_802_11_SSID)SetOid->Data;
- RtlCopyMemory(Ssid->Ssid, sSsid, wcslen(sSsid));
- Ssid->SsidLength = wcslen(sSsid);
+ snprintf(SsidBuffer, sizeof(SsidBuffer), "%S", sSsid);
+ RtlCopyMemory(Ssid->Ssid, SsidBuffer, strlen(SsidBuffer));
+ Ssid->SsidLength = strlen(SsidBuffer);
bSuccess = DeviceIoControl(hAdapter,
IOCTL_NDISUIO_SET_OID_VALUE,