]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-windows-backconnectionhostnames-20060902
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 2 Sep 2006 12:39:47 +0000 (12:39 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 2 Sep 2006 12:39:47 +0000 (12:39 +0000)
compute the final buffer size correctly.  don't write too much
into the registry when adding additional names.

src/WINNT/afsd/afsd_init.c

index e8a42f0ef8f7733bd9c68690bd7d7eafa97292ee..fbb012d477895b53e1c09063e597ebf5f67ac748 100644 (file)
@@ -310,7 +310,7 @@ configureBackConnectionHostNames(void)
             *pName = '\0';  /* add a second nul terminator */
 
             dwType = REG_MULTI_SZ;
-            dwSize += pName - pHostNames + 1;
+            dwSize = pName - pHostNames + 1;
             RegSetValueEx( hkMSV10, "BackConnectionHostNames", 0, dwType, pHostNames, dwSize);
 
             if ( RegOpenKeyEx( HKEY_LOCAL_MACHINE,