diff options
author | jmg <jmg@FreeBSD.org> | 1997-03-11 15:13:28 +0000 |
---|---|---|
committer | jmg <jmg@FreeBSD.org> | 1997-03-11 15:13:28 +0000 |
commit | 000a4351d9e352594f1bd2d3c8cf0120231ce74b (patch) | |
tree | 47ccdd480033c12ca4fba55deb1c9d56e9004cff /usr.bin/fetch | |
parent | eb462efd5af228e3d08bf71bd3998e0f9e95bfa5 (diff) | |
download | FreeBSD-src-000a4351d9e352594f1bd2d3c8cf0120231ce74b.zip FreeBSD-src-000a4351d9e352594f1bd2d3c8cf0120231ce74b.tar.gz |
fix a bug in processing of FTP_TIMEOUT environment variable.
Closes PR#2947
Submitted-by: Peter Childs <pjchilds@imforei.apana.org.au>
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r-- | usr.bin/fetch/ftp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/fetch/ftp.c b/usr.bin/fetch/ftp.c index a74cb2d..53a037c 100644 --- a/usr.bin/fetch/ftp.c +++ b/usr.bin/fetch/ftp.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ftp.c,v 1.4 1997/03/05 18:57:16 fenner Exp $ + * $Id: ftp.c,v 1.5 1997/03/06 10:01:54 jmg Exp $ */ #include <sys/types.h> @@ -370,7 +370,7 @@ ftp_retrieve(struct fetch_state *fs) if (env) { errno = 0; ul = strtoul(env, &ep, 0); - if (*env && *ep && errno == 0 && ul <= INT_MAX) + if (*env && *ep == '\0' && errno == 0 && ul <= INT_MAX) fs->fs_timeout = ul; else warnx("`%s': invalid FTP timeout", env); |