Marcus Meissner : wineboot: Fixed 2 buffer sizes.

Alexandre Julliard julliard at winehq.org
Mon Oct 25 10:58:19 CDT 2010


Module: wine
Branch: master
Commit: a2dfa7d8a6cae4ab651d2e7ba06cc01f5781d7c4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a2dfa7d8a6cae4ab651d2e7ba06cc01f5781d7c4

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Sun Oct 24 12:32:26 2010 +0200

wineboot: Fixed 2 buffer sizes.

---

 programs/wineboot/wineboot.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c
index 92331ee..4407e17 100644
--- a/programs/wineboot/wineboot.c
+++ b/programs/wineboot/wineboot.c
@@ -351,7 +351,7 @@ static void create_volatile_environment_registry_key(void)
         set_reg_value( hkey, HomeDriveW, path );
     }
 
-    size = sizeof(path);
+    size = sizeof(path)/sizeof(path[0]);
     if (GetUserNameW( path, &size )) set_reg_value( hkey, UserNameW, path );
 
     set_reg_value( hkey, HomeShareW, EmptyW );
@@ -360,7 +360,7 @@ static void create_volatile_environment_registry_key(void)
     if (SUCCEEDED(hr))
         set_reg_value( hkey, LocalAppDataW, path );
 
-    size = sizeof(computername) - 2;
+    size = (sizeof(computername)/sizeof(WCHAR)) - 2;
     if (GetComputerNameW(&computername[2], &size))
     {
         computername[0] = computername[1] = '\\';




More information about the wine-cvs mailing list