This segfault is caused by a wrong use of getopt_long() function. The third
argument (longopts)  should be terminated by zeros, but It wasn't.

Attached patch pixes that bug.
diff -ur mpc123-0.1.9+tla20060120.orig/mpc123.c mpc123-0.1.9+tla20060120/mpc123.c
--- mpc123-0.1.9+tla20060120.orig/mpc123.c	2006-06-03 21:56:46.000000000 +0200
+++ mpc123-0.1.9+tla20060120/mpc123.c	2006-08-31 08:42:12.000000000 +0200
@@ -130,7 +130,8 @@
     {"random", ARG_NO, 0, 'Z'},
     {"shuffle", ARG_NO, 0, 'z'},
     {"help", ARG_NO, 0, 'h'},
-    {"version", ARG_NO, 0, 'V'}
+    {"version", ARG_NO, 0, 'V'},
+    {0,      0,      0,      0}
   };
   int handled_signals[]={
     SIGSEGV,    /* mem problems */

Reply via email to