NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/51558: ftp dumps core after usage message when IPv6 URL lacks a slash
>Number: 51558
>Category: bin
>Synopsis: ftp dumps core after usage message when IPv6 URL lacks a slash
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Oct 16 23:15:00 +0000 2016
>Originator: box ast%NetBSD.org@localhost
>Release: NetBSD 7.99.25 and 7.0
>Organization:
>Environment:
System: NetBSD box 7.0_STABLE NetBSD 7.0_STABLE (GENERIC) #6: Tue Jul 26 17:35:33 CEST 2016 ast%x2.styx.ch@localhost:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
ftp dumps core after 'Invalid address' message
ftp 'http://[2a00:1450:400a:807::1005]#q=a'
ftp: Invalid address `[2a00:1450:400a:807::1005]#q=a' in URL `http://[2a00:1450:400a:807::1005]#q=a'
zsh: segmentation fault (core dumped) ftp 'http://[2a00:1450:400a:807::1005]#q=a'
>How-To-Repeat:
ftp 'http://[2a00:1450:400a:807::1005]#q=a'
>Fix:
Add the trailing slash after the IPv6:
ftp 'http://[2a00:1450:400a:807::1005]/#q=a'
Requesting http://[2a00:1450:400a:807::1005]/#q=a
ftp: Error retrieving file `404 Not Found'
But here's a patch which actually fixes the problem:
Index: usr.bin/ftp/fetch.c
===================================================================
RCS file: /cvsroot/src/usr.bin/ftp/fetch.c,v
retrieving revision 1.224
diff -u -r1.224 fetch.c
--- usr.bin/ftp/fetch.c 3 Aug 2016 12:33:56 -0000 1.224
+++ usr.bin/ftp/fetch.c 16 Oct 2016 21:30:29 -0000
@@ -1296,6 +1296,7 @@
rval = 1;
initurlinfo(&ui);
+ initurlinfo(&oui);
initauthinfo(&wauth, wwwauth);
initauthinfo(&pauth, proxyauth);
Home |
Main Index |
Thread Index |
Old Index