diff options
author | David Robillard <d@drobilla.net> | 2017-12-29 10:19:55 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-12-29 10:44:36 -0500 |
commit | 8a29a37768231ab9de4f479672127443a867e493 (patch) | |
tree | a7a5a55fd6e54bcf9943c626ce7876fb38694042 /utils | |
parent | 3c427ddbbb38eb271dcd1b8d23cbe07c8a8be025 (diff) | |
download | lilv-8a29a37768231ab9de4f479672127443a867e493.tar.gz lilv-8a29a37768231ab9de4f479672127443a867e493.tar.bz2 lilv-8a29a37768231ab9de4f479672127443a867e493.zip |
Never attempt to create VLA with 0 length
Diffstat (limited to 'utils')
-rw-r--r-- | utils/lv2apply.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |