Icecast segfault : auth_url.c
I'm using Icecast 2.4.0 with stream_auth authentication option. When Nicecast (OSX streaming client) connects and sends metadata, a segfault occurs.
I investigated a bit, and it seems that client->username and client->password (auth_url.c, lines 542/543) are both null.
My icecast.xml config file is almost genuine (changed the port, and configured a mountpoint with stream_auth). Please see attachments.
Here is a GDB run :
(gdb) run -c etc/icecast.xml Starting program: /home/radioking/icecast-dbg/icecast-2.4.0/build/bin/icecast -c etc/icecast.xml [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff7fda700 (LWP 16800)] [New Thread 0x7ffff7f59700 (LWP 16801)] [New Thread 0x7ffff7ed8700 (LWP 16802)] [New Thread 0x7ffff14ca700 (LWP 16803)] [New Thread 0x7ffff1449700 (LWP 16804)] [Thread 0x7ffff1449700 (LWP 16804) exited] [New Thread 0x7ffff083f700 (LWP 16805)] [New Thread 0x7ffff07be700 (LWP 16806)] [Thread 0x7ffff083f700 (LWP 16805) exited] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff7fda700 (LWP 16800)] strlen () at ../sysdeps/x86_64/strlen.S:106 106 ../sysdeps/x86_64/strlen.S: Aucun fichier ou dossier de ce type.
And the backtrace :
(gdb) bt #0 strlen () at ../sysdeps/x86_64/strlen.S:106 #1 0x000000000040ba9c in util_url_escape (src=0x0) at util.c:269 #2 0x000000000041e0db in url_stream_auth (auth_user=<optimized out>) at auth_url.c:542 #3 0x000000000041ac80 in stream_auth_callback (auth=0x64cf20, auth_user=0x684280) at auth.c:248 #4 0x000000000041a5cf in auth_run_thread (arg=arg@entry=0x64cf20) at auth.c:311 #5 0x0000000000421e77 in _start_routine (arg=0x657550) at thread.c:657 #6 0x00007ffff68c4182 in start_thread (arg=0x7ffff7fda700) at pthread_create.c:312 #7 0x00007ffff65f130d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111