diff options
author | David Robillard <d@drobilla.net> | 2020-12-16 17:01:46 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-16 17:01:46 +0100 |
commit | b17520360f43d147d767a81926a93660688c6c84 (patch) | |
tree | fc0373e5f91eb9fe663d202a28c6c9bf2843b83d /utils | |
parent | 0f4825cd1ed3d139261403e46542994d74f373eb (diff) | |
download | lilv-b17520360f43d147d767a81926a93660688c6c84.tar.gz lilv-b17520360f43d147d767a81926a93660688c6c84.tar.bz2 lilv-b17520360f43d147d767a81926a93660688c6c84.zip |
lv2apply: Fix potential zero-sized VLA
Diffstat (limited to 'utils')
-rw-r--r-- | utils/lv2apply.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/lv2apply.c b/utils/lv2apply.c index ba7b446..96fcf91 100644 --- a/utils/lv2apply.c +++ b/utils/lv2apply.c @@ -330,8 +330,8 @@ main(int argc, char** argv) /* Instantiate plugin and connect ports */ const uint32_t n_ports = lilv_plugin_get_num_ports(plugin); - float in_buf[self.n_audio_in]; - float out_buf[self.n_audio_out]; + float in_buf[self.n_audio_in > 0 ? self.n_audio_in : 1]; + float out_buf[self.n_audio_out > 0 ? self.n_audio_out : 1]; self.instance = lilv_plugin_instantiate( self.plugin, in_fmt.samplerate, NULL); for (uint32_t p = 0, i = 0, o = 0; p < n_ports; ++p) { |