mirror of
https://github.com/reactos/reactos
synced 2025-10-06 00:12:51 +02:00
[NET] Fix 'net use' command random fails (#8298)
CORE-20287 * Address reviewer comment by zeroing 'NETRESOURCE lpNet' in define.
This commit is contained in:
@@ -171,7 +171,7 @@ cmdUse(
|
||||
else
|
||||
{
|
||||
BOOL Persist = FALSE;
|
||||
NETRESOURCE lpNet;
|
||||
NETRESOURCE lpNet = { 0 };
|
||||
WCHAR Access[256];
|
||||
DWORD OutFlags = 0, Size = ARRAYSIZE(Access);
|
||||
|
||||
@@ -228,6 +228,7 @@ cmdUse(
|
||||
lpNet.dwType = RESOURCETYPE_DISK;
|
||||
lpNet.lpLocalName = (argv[2][0] != L'*') ? argv[2] : NULL;
|
||||
lpNet.lpRemoteName = argv[3];
|
||||
lpNet.lpComment = L"";
|
||||
lpNet.lpProvider = NULL;
|
||||
|
||||
Status = WNetUseConnection(NULL, &lpNet, NULL, NULL, CONNECT_REDIRECT | (Persist ? CONNECT_UPDATE_PROFILE : 0), Access, &Size, &OutFlags);
|
||||
|
Reference in New Issue
Block a user