Author: cgutman
Date: Sat Jul 24 15:04:24 2010
New Revision: 48232
URL:
http://svn.reactos.org/svn/reactos?rev=48232&view=rev
Log:
[DHCPCSVC]
- Initialize length to prevent a possible buffer overflow
- Thanks to janderwald for finding my mistake
Modified:
trunk/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c
Modified: trunk/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dhcpcsvc/dhcp/ad…
==============================================================================
--- trunk/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c [iso-8859-1] Sat Jul 24 15:04:24 2010
@@ -147,7 +147,7 @@
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,