diff options
author | David Robillard <d@drobilla.net> | 2022-06-29 14:35:34 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-17 13:50:39 -0400 |
commit | 499d60e27ef89b0fa7f627a153eedb2a36ae4efa (patch) | |
tree | d78856f44c8a786473b60ce26ca83748d2954d43 | |
parent | 84564f2d1d673f72812b9fd0fe45d8397aabeeed (diff) | |
download | jalv-499d60e27ef89b0fa7f627a153eedb2a36ae4efa.tar.gz jalv-499d60e27ef89b0fa7f627a153eedb2a36ae4efa.tar.bz2 jalv-499d60e27ef89b0fa7f627a153eedb2a36ae4efa.zip |
Avoid snprintf()
-rw-r--r-- | src/jack.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -530,7 +530,8 @@ jack_initialize(jack_client_t* const client, const char* const load_init) // Build full command line with "program" name for building argv const size_t cmd_len = strlen("jalv ") + args_len; char* const cmd = (char*)calloc(cmd_len + 1, 1); - snprintf(cmd, cmd_len + 1, "jalv %s", load_init); + memcpy(cmd, "jalv ", strlen("jalv ") + 1); + memcpy(cmd + 5, load_init, args_len + 1); // Build argv int argc = 0; |