[NETCFGX] Resize a helper buffer to accommodate a device instance id.

This prevent NULL pointer exceptions in calls to INetCfgComponent::GetPnpDevNodeId().
This commit is contained in:
Eric Kohl 2019-06-17 00:46:30 +02:00
parent 76224b711b
commit 24b22db77e
2 changed files with 2 additions and 1 deletions

View file

@ -372,7 +372,7 @@ EnumerateNetworkAdapter(NetCfgComponentItem ** pHead)
SP_DEVINFO_DATA DevInfo; SP_DEVINFO_DATA DevInfo;
HKEY hKey; HKEY hKey;
WCHAR szNetCfg[50]; WCHAR szNetCfg[50];
WCHAR szAdapterNetCfg[50]; WCHAR szAdapterNetCfg[MAX_DEVICE_ID_LEN];
WCHAR szDetail[200] = L"SYSTEM\\CurrentControlSet\\Control\\Class\\"; WCHAR szDetail[200] = L"SYSTEM\\CurrentControlSet\\Control\\Class\\";
WCHAR szName[130] = L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\"; WCHAR szName[130] = L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\";
NetCfgComponentItem * pLast = NULL, *pCurrent; NetCfgComponentItem * pLast = NULL, *pCurrent;

View file

@ -21,6 +21,7 @@
#include <netcfgn.h> #include <netcfgn.h>
#include <devguid.h> #include <devguid.h>
#include <commctrl.h> #include <commctrl.h>
#include <cfgmgr32.h>
#include <wine/debug.h> #include <wine/debug.h>