Vitaliy Margolen : kernel32: Fix off by one error.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Apr 30 07:11:20 CDT 2007
Module: wine
Branch: master
Commit: 2bd4d6b1801c1d33fb92bf878558aea63ac317db
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2bd4d6b1801c1d33fb92bf878558aea63ac317db
Author: Vitaliy Margolen <wine-patches at kievinfo.com>
Date: Sat Apr 28 15:50:22 2007 -0600
kernel32: Fix off by one error.
---
dlls/kernel32/process.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 8b8bd3c..8e5999f 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -346,7 +346,7 @@ static void set_registry_variables( HANDLE hkey, ULONG type )
env_value.Buffer = (WCHAR *)(buffer + info->DataOffset);
env_value.Length = env_value.MaximumLength = info->DataLength;
if (env_value.Length && !env_value.Buffer[env_value.Length/sizeof(WCHAR)-1])
- env_value.Length--; /* don't count terminating null if any */
+ env_value.Length -= sizeof(WCHAR); /* don't count terminating null if any */
if (info->Type == REG_EXPAND_SZ)
{
WCHAR buf_expanded[1024];
More information about the wine-cvs
mailing list