From 8a29a37768231ab9de4f479672127443a867e493 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 29 Dec 2017 10:19:55 -0500 Subject: Never attempt to create VLA with 0 length --- utils/lv2apply.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'utils/lv2apply.c') diff --git a/utils/lv2apply.c b/utils/lv2apply.c index 7f45733..7dfbb2e 100644 --- a/utils/lv2apply.c +++ b/utils/lv2apply.c @@ -291,7 +291,8 @@ main(int argc, char** argv) return 5; } - if (in_fmt.channels != (int)self.n_audio_in && in_fmt.channels != 1) { + if (self.n_audio_in == 0 || + (in_fmt.channels != (int)self.n_audio_in && in_fmt.channels != 1)) { return fatal(&self, 6, "Unable to map %d inputs to %d ports\n", in_fmt.channels, self.n_audio_in); } -- cgit v1.2.1