viced: null-terminate server list for ubik
authorDerrick Brashear <shadow@dementix.org>
Fri, 29 Jun 2012 14:04:10 +0000 (10:04 -0400)
committerDerrick Brashear <shadow@dementix.org>
Fri, 29 Jun 2012 14:37:40 +0000 (07:37 -0700)
when we set up the vlserver connection, we could potentially use
uninitialized memory as ubik connections. don't.

Change-Id: Idefa71874c7402c927fbf148f994f9422183208a
Reviewed-on: http://gerrit.openafs.org/7610
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/viced/viced.c

index 982aad2..c448d80 100644 (file)
@@ -1494,6 +1494,7 @@ vl_Initialize(struct afsconf_dir *dir)
     struct rx_securityClass *sc;
     struct rx_connection *serverconns[MAXSERVERS];
 
+    memset(serverconns, 0, sizeof(serverconns));
     code = afsconf_ClientAuth(dir, &sc, &scIndex);
     if (code) {
        ViceLog(0, ("Could not get security object for localAuth\n"));