From 8e7f16e570e96bd7319a04f27daba8473cf54136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Tue, 28 Sep 2004 20:40:15 +0000 Subject: [PATCH] Don't return data length if not requested svn path=/trunk/; revision=11112 --- reactos/lib/advapi32/reg/reg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reactos/lib/advapi32/reg/reg.c b/reactos/lib/advapi32/reg/reg.c index 5cd822b002b..1c13a31c662 100644 --- a/reactos/lib/advapi32/reg/reg.c +++ b/reactos/lib/advapi32/reg/reg.c @@ -1,4 +1,4 @@ -/* $Id: reg.c,v 1.57 2004/09/13 14:42:37 ekohl Exp $ +/* $Id: reg.c,v 1.58 2004/09/28 20:40:15 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -1444,7 +1444,10 @@ RegEnumValueW (HKEY hKey, *lpcbValueName = (DWORD)(ValueInfo->Basic.NameLength / sizeof(WCHAR)); lpValueName[*lpcbValueName] = 0; } - *lpcbData = (DWORD)ValueInfo->Full.DataLength; + if (NULL != lpcbData) + { + *lpcbData = (DWORD)ValueInfo->Full.DataLength; + } } if (ErrorCode == ERROR_SUCCESS && lpType != NULL)