From 17b4930a9ddee516bd9141287f9440f829791dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Thu, 15 Dec 2016 14:45:58 +0000 Subject: [PATCH] [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... svn path=/trunk/; revision=73457 --- reactos/dll/win32/netapi32/local_group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/netapi32/local_group.c b/reactos/dll/win32/netapi32/local_group.c index 1b00ea2da6e..798248d8fcc 100644 --- a/reactos/dll/win32/netapi32/local_group.c +++ b/reactos/dll/win32/netapi32/local_group.c @@ -103,7 +103,7 @@ BuildAliasInfoBuffer(PALIAS_GENERAL_INFORMATION AliasInfo, 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,