https://git.reactos.org/?p=reactos.git;a=commitdiff;h=24b22db77ed8d286e35b5161da040ce2b94d140c

commit 24b22db77ed8d286e35b5161da040ce2b94d140c
Author:     Eric Kohl <[email protected]>
AuthorDate: Mon Jun 17 00:46:30 2019 +0200
Commit:     Eric Kohl <[email protected]>
CommitDate: Mon Jun 17 00:46:30 2019 +0200

    [NETCFGX] Resize a helper buffer to accommodate a device instance id.
    
    This prevent NULL pointer exceptions in calls to 
INetCfgComponent::GetPnpDevNodeId().
---
 dll/win32/netcfgx/netcfg_iface.c | 2 +-
 dll/win32/netcfgx/precomp.h      | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/dll/win32/netcfgx/netcfg_iface.c b/dll/win32/netcfgx/netcfg_iface.c
index 81d2c22ad1f..2dfbcf4dad0 100644
--- a/dll/win32/netcfgx/netcfg_iface.c
+++ b/dll/win32/netcfgx/netcfg_iface.c
@@ -372,7 +372,7 @@ EnumerateNetworkAdapter(NetCfgComponentItem ** pHead)
     SP_DEVINFO_DATA DevInfo;
     HKEY hKey;
     WCHAR szNetCfg[50];
-    WCHAR szAdapterNetCfg[50];
+    WCHAR szAdapterNetCfg[MAX_DEVICE_ID_LEN];
     WCHAR szDetail[200] = L"SYSTEM\\CurrentControlSet\\Control\\Class\\";
     WCHAR szName[130] = 
L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\";
     NetCfgComponentItem * pLast = NULL, *pCurrent;
diff --git a/dll/win32/netcfgx/precomp.h b/dll/win32/netcfgx/precomp.h
index ed736aea491..ceaa12e571a 100644
--- a/dll/win32/netcfgx/precomp.h
+++ b/dll/win32/netcfgx/precomp.h
@@ -21,6 +21,7 @@
 #include <netcfgn.h>
 #include <devguid.h>
 #include <commctrl.h>
+#include <cfgmgr32.h>
 
 #include <wine/debug.h>
 

Reply via email to