Author: hbelusca Date: Thu Dec 15 14:45:58 2016 New Revision: 73457
URL: http://svn.reactos.org/svn/reactos?rev=73457&view=rev Log: [NETAPI32]: Fix misusage of a pointer, that caused a crash when using the command "net localgroup". Address one of the problems described in CORE-11081. Note that those ((ULONG_PTR)the_pointer + sizeof(type_pointed_by_the_pointer)) could be somewhat short cut into: (the_pointer + 1) (with the_pointer being of type *type_pointed_by_the_pointer). But anyway...
Modified: trunk/reactos/dll/win32/netapi32/local_group.c
Modified: trunk/reactos/dll/win32/netapi32/local_group.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/local_gr... ============================================================================== --- trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/local_group.c [iso-8859-1] Thu Dec 15 14:45:58 2016 @@ -103,7 +103,7 @@ case 0: LocalInfo0 = (PLOCALGROUP_INFO_0)LocalBuffer;
- Ptr = (LPWSTR)LocalInfo0++; + Ptr = (LPWSTR)((ULONG_PTR)LocalInfo0 + sizeof(LOCALGROUP_INFO_0)); LocalInfo0->lgrpi0_name = Ptr;
memcpy(LocalInfo0->lgrpi0_name,