NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/60930: ftp with file:/// uri fails, ftp_strdup: called with NULL argument
The following reply was made to PR bin/60930; it has been noted by GNATS.
From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: bin/60930: ftp with file:/// uri fails, ftp_strdup: called with
NULL argument
Date: Tue, 27 Oct 2026 10:03:01 +0100
(gdb) break errx
Breakpoint 2 at 0xf73433cc: file /work/src/lib/libc/gen/errx.c, line 56.
(gdb) run
Starting program: /usr/bin/ftp file:///netbsd
Breakpoint 2, _errx (eval=eval@entry=1,
fmt=fmt@entry=0x961d734 "ftp_strdup: called with NULL argument")
at /work/src/lib/libc/gen/errx.c:56
warning: 56 /work/src/lib/libc/gen/errx.c: No such file or directory
(gdb) bt
#0 _errx (eval=eval@entry=1,
fmt=fmt@entry=0x961d734 "ftp_strdup: called with NULL argument")
at /work/src/lib/libc/gen/errx.c:56
#1 0x096156d4 in ftp_strdup (str=str@entry=0x0)
at /work/src/usr.bin/ftp/util.c:1602
#2 0x0960518c in copyurlinfo (dui=0xfffce370, sui=0xfffce35c)
at /work/src/usr.bin/ftp/fetch.c:240
#3 fetch_url (url=0xfffcf781 "file:///netbsd", proxyenv=<optimized out>,
proxyauth=0x0, wwwauth=0x0, rui=0x0) at /work/src/usr.bin/ftp/fetch.c:1460
#4 0x0960801c in auto_fetch (argc=1, argv=0xfffcf248)
at /work/src/usr.bin/ftp/fetch.c:2421
#5 0x09617a0c in main (argc=<optimized out>, argv=<optimized out>)
at /work/src/usr.bin/ftp/main.c:550
(gdb) up 2
#2 0x0960518c in copyurlinfo (dui=0xfffce370, sui=0xfffce35c)
at /work/src/usr.bin/ftp/fetch.c:240
warning: 240 /work/src/usr.bin/ftp/fetch.c: No such file or directory
(gdb) p *sui
$1 = {host = 0x0, port = 0xf5c580f0 "", path = 0xf5c580e8 "/netbsd",
utype = FILE_URL_T, portnum = 0}
(gdb) p *dui
$2 = {host = 0x0, port = 0x0, path = 0x0, utype = UNKNOWN_URL_T, portnum = 0}
I guess the three ftp_strdup in that function should all be replaced
by an if testing for NULL and setting the target to NULL in that case.
Martin
Home |
Main Index |
Thread Index |
Old Index