Author: tfaber
Date: Tue Sep 1 14:09:51 2015
New Revision: 68897
URL:
http://svn.reactos.org/svn/reactos?rev=68897&view=rev
Log:
[NETAPI32]
- Correctly reallocate buffer in NetWkstaUserGetInfo. Fixes one of the many exceptions
when running netapi32 tests with DPH.
Modified:
trunk/reactos/dll/win32/netapi32/wksta.c
Modified: trunk/reactos/dll/win32/netapi32/wksta.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/wksta.c…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/wksta.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/wksta.c [iso-8859-1] Tue Sep 1 14:09:51 2015
@@ -310,7 +310,12 @@
(lstrlenW(ui->wkui0_username) + 1) * sizeof(WCHAR),
(LPVOID *) bufptr);
if (nastatus != NERR_Success)
+ {
+ NetApiBufferFree(ui);
return nastatus;
+ }
+ ui = (PWKSTA_USER_INFO_0) *bufptr;
+ ui->wkui0_username = (LMSTR) (*bufptr + sizeof(WKSTA_USER_INFO_0));
}
break;
}