[DHCPCSVC]
authorCameron Gutman <aicommander@gmail.com>
Sat, 24 Jul 2010 15:04:24 +0000 (15:04 +0000)
committerCameron Gutman <aicommander@gmail.com>
Sat, 24 Jul 2010 15:04:24 +0000 (15:04 +0000)
- Initialize length to prevent a possible buffer overflow
- Thanks to janderwald for finding my mistake

svn path=/trunk/; revision=48232

reactos/dll/win32/dhcpcsvc/dhcp/adapter.c

index c0ba02d..ffa176f 100644 (file)
@@ -147,7 +147,7 @@ cleanup:
 
 BOOL PrepareAdapterForService( PDHCP_ADAPTER Adapter ) {
     HKEY AdapterKey;
-    DWORD Error = ERROR_SUCCESS, DhcpEnabled, Length;
+    DWORD Error = ERROR_SUCCESS, DhcpEnabled, Length = sizeof(DWORD);
 
     Adapter->DhclientState.config = &Adapter->DhclientConfig;
     strncpy(Adapter->DhclientInfo.name, (char*)Adapter->IfMib.bDescr,