STABLE14-windows-backconnectionhostnames-20060902

compute the final buffer size correctly.  don't write too much
into the registry when adding additional names.
This commit is contained in:
Jeffrey Altman 2006-09-02 12:39:47 +00:00
parent 4be0881b04
commit 92cc14bcb3

View 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,