diff --git a/reactos/dll/win32/samsrv/samrpc.c b/reactos/dll/win32/samsrv/samrpc.c index 6c0335bc930..5932c3b68c4 100644 --- a/reactos/dll/win32/samsrv/samrpc.c +++ b/reactos/dll/win32/samsrv/samrpc.c @@ -2179,7 +2179,7 @@ SamrEnumerateGroupsInDomain(IN SAMPR_HANDLE DomainHandle, EnumBuffer->Buffer[i].RelativeId = Rid; EnumBuffer->Buffer[i].Name.Length = (USHORT)NameLength; - EnumBuffer->Buffer[i].Name.MaximumLength = (USHORT)(DataLength + sizeof(UNICODE_NULL)); + EnumBuffer->Buffer[i].Name.MaximumLength = (USHORT)(NameLength + sizeof(UNICODE_NULL)); /* FIXME: Disabled because of bugs in widl and rpcrt4 */ #if 0 @@ -2790,7 +2790,7 @@ SamrEnumerateUsersInDomain(IN SAMPR_HANDLE DomainHandle, EnumBuffer->Buffer[i].RelativeId = Rid; EnumBuffer->Buffer[i].Name.Length = (USHORT)NameLength; - EnumBuffer->Buffer[i].Name.MaximumLength = (USHORT)(DataLength + sizeof(UNICODE_NULL)); + EnumBuffer->Buffer[i].Name.MaximumLength = (USHORT)(NameLength + sizeof(UNICODE_NULL)); /* FIXME: Disabled because of bugs in widl and rpcrt4 */ #if 0 @@ -3171,7 +3171,7 @@ SamrEnumerateAliasesInDomain(IN SAMPR_HANDLE DomainHandle, EnumBuffer->Buffer[i].RelativeId = Rid; EnumBuffer->Buffer[i].Name.Length = (USHORT)NameLength; - EnumBuffer->Buffer[i].Name.MaximumLength = (USHORT)(DataLength + sizeof(UNICODE_NULL)); + EnumBuffer->Buffer[i].Name.MaximumLength = (USHORT)(NameLength + sizeof(UNICODE_NULL)); /* FIXME: Disabled because of bugs in widl and rpcrt4 */ #if 0