Date: Wed, 10 May 2023 12:55:52 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 271350] ftp(1) does not process file:// uris correctly Message-ID: <bug-271350-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271350 Bug ID: 271350 Summary: ftp(1) does not process file:// uris correctly Product: Base System Version: 13.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: miod@online.fr ftp(1) will enter an infinite loop when used in non-interactive mode with a `file://' uri as argument. This is caused by the `bufsize` local variable of `fetch_url()` in `contrib/tnftp/src/fetch.c` being only set to a non-zero value when sockets= are created to fetch files from the network. Because of this, the loop-until-all-the-contents-are-read starting on line 1215 always computes a value of 0 for `bufrem`, does not perform any I/O, and basically spins hogg= ing the cpu. How to reproduce: $ cd /tmp && ftp file:///etc/passwd Expected result: copy of /etc/passwd in /tmp Observed result: progress bar at 0%, no ETA, one cpu spinning Workaround: Use fetch(1). --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271350-227>