Hi.

ftp(1) segfaults when trying to complete with an utf8 char.

ftp> cd pub/t[utf8 char] <tab>
Program received signal SIGSEGV, Segmentation fault.
memcpy (dst0=0x9d9560, src0=Variable "src0" is not available.
) at /usr/src/lib/libc/string/bcopy.c:115
115                             TLOOP1(*--dst = *--src);
(gdb) bt full
#0  memcpy (dst0=0x9d9560, src0=Variable "src0" is not available.
) at /usr/src/lib/libc/string/bcopy.c:115
        dst = 0x9d9567 ""
        src = 0x7 <Address 0x7 out of bounds>
        t = 7
#1  0x00000000004050c3 in complete (el=0x20172b800, ch=9) at 
/usr/src/usr.bin/ftp/complete.c:313
        c = (struct cmd *) 0xa9
        lf = (const LineInfo *) 0x20172bc90
        celems = 32639
        dolist = 0
        len = 12
        word = '\0' <repeats 1223 times>
        lastc_argc = 0
        lastc_argo = 0
#2  0x00000000004228b4 in el_wgets (el=0x20172b800, nread=0x7f7ffffcc26c) at 
read.c:612
        cmdnum = Variable "cmdnum" is not available.
(gdb) bt
#0  memcpy (dst0=0x9d9560, src0=Variable "src0" is not available.
) at /usr/src/lib/libc/string/bcopy.c:115
#1  0x00000000004050c3 in complete (el=0x20172b800, ch=9) at 
/usr/src/usr.bin/ftp/complete.c:313
#2  0x00000000004228b4 in el_wgets (el=0x20172b800, nread=0x7f7ffffcc26c) at 
read.c:612
#3  0x0000000000422cbd in el_gets (el=0x20172b800, nread=Variable "nread" is 
not available.
) at eln.c:78
#4  0x00000000004110a2 in cmdscanner (top=1) at /usr/src/usr.bin/ftp/main.c:465
#5  0x0000000000410d57 in main (argc=1, argv=0x7f7ffffcc780) at 
/usr/src/usr.bin/ftp/main.c:369


-- 
Antoine

Reply via email to