> ping hostname which has slash in the name causes seg fault
>
> # ping a/aa
> Segmentation fault
>
> ping6 seems to be ok reporting no address associated with name
> 5.4 ping is reporting unknown host - ok
>

Thanks for reporting. Confirmed on -current i386. ping crashes when
calling gethostbyname("a/aa"). backtrace below.

I'm cc'ing eric@ if he has any thoughts.

Program received signal SIGSEGV, Segmentation fault.
strlcpy (dst=0x3c0081ac "", src=0x0, siz=4084) at
/usr/src/lib/libc/string/strlcpy.c:37
37                              if ((*d++ = *s++) == '\0')
(gdb) bt
#0  strlcpy (dst=0x3c0081ac "", src=0x0, siz=4084) at
/usr/src/lib/libc/string/strlcpy.c:37
#1  0x1c005089 in _fillhostent (h=0x81274000, r=0x3c008180,
buf=Variable "buf" is not available.
) at /usr/src/lib/libc/asr/gethostnamadr.c:73
#2  0x1c005320 in gethostbyname2 (name=0xcfbd9404 "a/aa", af=2) at
/usr/src/lib/libc/asr/gethostnamadr.c:125
#3  0x1c005400 in gethostbyname (name=0xcfbd9404 "a/aa") at
/usr/src/lib/libc/asr/gethostnamadr.c:142
#4  0x1c002ea3 in main (argc=Variable "argc" is not available.
) at /usr/src/sbin/ping/ping.c:356

Reply via email to