Browse code

Fix crash with IPV6 download in freshclam

git-svn: trunk@4077

Török Edvin authored on 2008/08/04 20:51:47
Showing 1 changed files
... ...
@@ -631,7 +631,7 @@ static int getfile(const char *srcfile, const char *destfile, const char *hostna
631 631
 	int bread, fd, totalsize = 0,  rot = 0, totaldownloaded = 0,
632 632
 	    percentage = 0, sd;
633 633
 	unsigned int i;
634
-	char *remotename = NULL, *authorization = NULL, *headerline, ipaddr[16];
634
+	char *remotename = NULL, *authorization = NULL, *headerline, ipaddr[46];
635 635
 	const char *rotation = "|/-\\";
636 636
 
637 637
 
... ...
@@ -662,7 +662,6 @@ static int getfile(const char *srcfile, const char *destfile, const char *hostna
662 662
 	uas ? uas : PACKAGE"/", uas ? "" : get_version());
663 663
 
664 664
     memset(ipaddr, 0, sizeof(ipaddr));
665
-
666 665
     if(ip[0]) /* use ip to connect */
667 666
 	sd = wwwconnect(ip, proxy, port, ipaddr, localip, ctimeout, mdat, logerr, can_whitelist);
668 667
     else