From 819490ac0742965de29fe88c1dca4baf1446aefd Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Thu, 6 Jun 2002 14:03:58 +0000 Subject: [PATCH] Fixed the copy length in RtlQueryRegistryValues(). Found by Hartmut Birr. svn path=/trunk/; revision=3011 --- reactos/lib/ntdll/rtl/registry.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/reactos/lib/ntdll/rtl/registry.c b/reactos/lib/ntdll/rtl/registry.c index bf8a8a9acc3..ecf45718a72 100644 --- a/reactos/lib/ntdll/rtl/registry.c +++ b/reactos/lib/ntdll/rtl/registry.c @@ -1,4 +1,4 @@ -/* $Id: registry.c,v 1.12 2002/05/24 18:07:01 ekohl Exp $ +/* $Id: registry.c,v 1.13 2002/06/06 14:03:58 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -12,7 +12,6 @@ /* * TODO: * - finish RtlQueryRegistryValues() - * - expand REG_EXPAND_SZ * - support RTL_QUERY_REGISTRY_DELETE * * - finish RtlFormatCurrentUserKeyPath() @@ -313,7 +312,7 @@ RtlQueryRegistryValues(IN ULONG RelativeTo, ValueString->MaximumLength - sizeof(WCHAR)); memcpy(ValueString->Buffer, ValueInfo->Data, - ValueInfo->DataLength); + ValueString->Length); ((PWSTR)ValueString->Buffer)[ValueString->Length / sizeof(WCHAR)] = 0; } else