Commit 7164fde4 authored by Thomas Faber's avatar Thomas Faber Committed by Alexandre Julliard

netapi32: Correctly reallocate buffer in NetWkstaUserGetInfo.

parent 637bcd5d
...@@ -1627,8 +1627,13 @@ NET_API_STATUS WINAPI NetWkstaUserGetInfo(LMSTR reserved, DWORD level, ...@@ -1627,8 +1627,13 @@ NET_API_STATUS WINAPI NetWkstaUserGetInfo(LMSTR reserved, DWORD level,
(lstrlenW(ui->wkui0_username) + 1) * sizeof(WCHAR), (lstrlenW(ui->wkui0_username) + 1) * sizeof(WCHAR),
(LPVOID *) bufptr); (LPVOID *) bufptr);
if (nastatus != NERR_Success) if (nastatus != NERR_Success)
{
NetApiBufferFree(ui);
return nastatus; return nastatus;
} }
ui = (PWKSTA_USER_INFO_0) *bufptr;
ui->wkui0_username = (LMSTR) (*bufptr + sizeof(WKSTA_USER_INFO_0));
}
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment