Make sure srvcount is initialized.
authorDavid Shaw <dshaw@jabberwocky.com>
Thu, 20 Dec 2012 23:12:29 +0000 (18:12 -0500)
committerDavid Shaw <dshaw@jabberwocky.com>
Thu, 20 Dec 2012 23:12:29 +0000 (18:12 -0500)
* keyserver/gpgkeys_hkp.c (srv_replace): Initialize srvcount.

keyserver/gpgkeys_hkp.c

index ff41f97..d90027a 100644 (file)
@@ -547,6 +547,8 @@ srv_replace(const char *srvtag,
       strcat(srvname,opt->host);
       srvcount=getsrv(srvname,&srvlist);
     }
+  else
+    srvcount = 0;
 
   for(srvindex=0 ; srvindex<srvcount && portstr ; srvindex++)
     {