From: Derrick Brashear Date: Thu, 15 May 2003 16:46:13 +0000 (+0000) Subject: STABLE12-ubik-dont-copy-stack-garbage-when-netinfo-forces-primary-address-change... X-Git-Tag: openafs-stable-1_2_10~75 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9d47ffa0406329fe5bcd696d2d5e2f9dc4990c90;p=packages%2Fo%2Fopenafs.git STABLE12-ubik-dont-copy-stack-garbage-when-netinfo-forces-primary-address-change-20030505 don't mess up count by reusing it (cherry picked from commit 6cb978478120614f0f9df21a08a3be9decc89435) --- diff --git a/src/ubik/beacon.c b/src/ubik/beacon.c index 629a16ab0..25411aa05 100644 --- a/src/ubik/beacon.c +++ b/src/ubik/beacon.c @@ -456,7 +456,7 @@ static verifyInterfaceAddress(ame, info, aservers) { afs_uint32 myAddr[UBIK_MAX_INTERFACE_ADDR], *servList, tmpAddr; afs_uint32 myAddr2[UBIK_MAX_INTERFACE_ADDR]; - int count, found, i, j, totalServers, start, end, usednetfiles = 0; + int tcount, count, found, i, j, totalServers, start, end, usednetfiles = 0; if (info) totalServers = info->numServers; @@ -520,15 +520,15 @@ static verifyInterfaceAddress(ame, info, aservers) if (usednetfiles) { /* take the address we did get, then see if ame was masked */ *ame=myAddr[0]; - count = rx_getAllAddr(myAddr2, UBIK_MAX_INTERFACE_ADDR); - if ( count <= 0 ) /* no address found */ + tcount = rx_getAllAddr(myAddr2, UBIK_MAX_INTERFACE_ADDR); + if ( tcount <= 0 ) /* no address found */ { ubik_print("ubik: No network addresses found, aborting.."); return UBADHOST; } /* verify that the My-address passed in by ubik is correct */ - for ( j=0, found = 0; j < count; j++) + for ( j=0, found = 0; j < tcount; j++) { if ( *ame == myAddr2[j] ) /* both in net byte order */ {