From: Jeffrey Altman Date: Thu, 17 Aug 2006 13:40:16 +0000 (+0000) Subject: windows-backconnectionhostnames-20060817 X-Git-Tag: BP-openafs-windows-kdfs-ifs~1095 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=16dc98ab4654f448909d59f65b2a8e3a55bc93b8;p=packages%2Fo%2Fopenafs.git windows-backconnectionhostnames-20060817 FIXES 37807 uninitialized variable reported due to dwAllocSize not being used within the initial RegQueryValueEx call. (ugh) --- diff --git a/src/WINNT/afsd/afsd_init.c b/src/WINNT/afsd/afsd_init.c index 75fa0e74c..2eed2a1f2 100644 --- a/src/WINNT/afsd/afsd_init.c +++ b/src/WINNT/afsd/afsd_init.c @@ -282,7 +282,7 @@ configureBackConnectionHostNames(void) &hkMSV10) == ERROR_SUCCESS ) { if (RegQueryValueEx( hkMSV10, "BackConnectionHostNames", 0, - &dwType, NULL, &dwSize) == ERROR_SUCCESS) { + &dwType, NULL, &dwAllocSize) == ERROR_SUCCESS) { dwAllocSize += 1 /* in case the source string is not nul terminated */ + strlen(cm_NetbiosName) + 2; pHostNames = malloc(dwAllocSize);