The for() loop that makes an RXAFS_GetTime call in afs_CheckServers
was iterating over conns and rxconns from 0 to j. However, 'j' here is
just the size of the allocated array, whereas 'nconns' is the number
of structures in the array actually initialized. So, just go up to
nconns to avoid using unitialized connections and Rx connections.
This is a 1.6-only change. On master, the -settime code has been
completely removed in change
Id291f5f88b1ad84594706f2a1a02a933dddd0cb9.
Issue reported by Sebastian Hanigk.
Change-Id: Iec782a4464899b5a7e49e193b04f79e31c6b37f2
Reviewed-on: http://gerrit.openafs.org/5788
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
} multi_End;
}
else { /* find and query setTimeHost only */
- for ( i = 0 ; i < j ; i++ ) {
+ for ( i = 0 ; i < nconns ; i++ ) {
if ( conns[i] == NULL || conns[i]->srvr == NULL )
continue;
if ( conns[i]->srvr->server == afs_setTimeHost ) {