Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 1997 17:10:03 -0800 (PST)
From:      "John R. Jackson" <jrj@gandalf.cc.purdue.edu>
To:        freebsd-bugs
Subject:   Re: bin/2779: Uninitialized variable may cause "fetch -m" to fail 
Message-ID:  <199702210110.RAA22919@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/2779; it has been noted by GNATS.

From: "John R. Jackson" <jrj@gandalf.cc.purdue.edu>
To: bug-followup@freebsd.org
Cc:  Subject: Re: bin/2779: Uninitialized variable may cause "fetch -m" to fail 
Date: Thu, 20 Feb 1997 13:22:16 EST

 Here is a suggested patch for this problem.  --JJ
 
 *** main.c	Wed Feb 19 17:28:16 1997
 --- main.c	Wed Feb 19 17:43:16 1997
 ***************
 *** 399,404 ****
 --- 399,405 ----
       
       if (!strcmp (outputfile, "-"))
   	restart = 0;
 +     seekloc = 0;
       if (restart || mirror) {
   	f_size (outputfile, &size0, &t);
   	if (mirror && size0 == size && modtime <= t) {
 ***************
 *** 409,419 ****
   	    if (size0 && size0 < size)
   		seekloc = size0;
   	    else
 ! 		seekloc = size0 = 0;
   	}
       }	    
       else if (!restart)
 ! 	seekloc = size0 = 0;
       
       fp = ftpGet (ftp, file_to_get, &seekloc);
       if (fp == NULL)
 --- 410,420 ----
   	    if (size0 && size0 < size)
   		seekloc = size0;
   	    else
 ! 		size0 = 0;
   	}
       }	    
       else if (!restart)
 ! 	size0 = 0;
       
       fp = ftpGet (ftp, file_to_get, &seekloc);
       if (fp == NULL)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702210110.RAA22919>