ref: ddb3f05af5d800611f223197eb3e6e3ad962c8bc
parent: 5469291fcec13d4482730caed009d8577472090e
author: Ulrich Klauer <ulrich@chirlu.de>
date: Mon Oct 10 23:48:53 EDT 2011
delay effect: more syntax checking Make sure that there are at most as many delay values given as there are channels. (This could lead to strange effects otherwise, since the excess arguments were considered when computing the maximum value.)
--- a/src/delay.c
+++ b/src/delay.c
@@ -74,6 +74,10 @@
if (!p->max_arg)
return SOX_EFF_NULL;
+ if (p->argc > effp->in_signal.channels) {
+ lsx_fail("too few input channels");
+ return SOX_EOF;
+ }
if (effp->flow < p->argc)
lsx_parsesamples(effp->in_signal.rate, p->argv[effp->flow], &p->buffer_size, 't');
lsx_parsesamples(effp->in_signal.rate, p->max_arg, &max_delay, 't');