shithub: sox

Download patch

ref: cd2fbdcf40b712559c96020467f5628e7e2c71d5
parent: 8f56b0d4535e9b6d46fb22f5b52e26b25e8d46a2
author: robs <robs>
date: Sat Oct 25 11:11:07 EDT 2008

fix crash: compensate for SOX_EFF_GETOPT

--- a/src/pitch.c
+++ b/src/pitch.c
@@ -28,7 +28,7 @@
 {
   double d;
   char dummy, arg[100], **argv2 = malloc(argc * sizeof(*argv2));
-  int ret, pos = (argc && !strcmp(*argv, "-q"))? 1 : 0;
+  int ret, pos = (argc > 1 && !strcmp(argv[1], "-q"))? 2 : 1;
 
   if (argc <= pos || sscanf(argv[pos], "%lf %c", &d, &dummy) != 1)
     return lsx_usage(effp);