Fix off-by-one NULL termination in array
Note: the client name length test still fails, this is a different issue.
This commit is contained in:
parent
d46970bb79
commit
667e06890e
|
@ -753,7 +753,7 @@ int main (int argc, char *argv[])
|
|||
client_name3[i] = 'A';
|
||||
}
|
||||
// And last one is the terminating '0'
|
||||
client_name3[jack_client_name_size()] = 0;
|
||||
client_name3[jack_client_name_size()-1] = 0;
|
||||
Log("trying to register a new jackd client with maximum possible client name size...\n", client_name3);
|
||||
client2 = jack_client_open(client_name3, jack_options, &status, server_name);
|
||||
if (client2 != NULL) {
|
||||
|
@ -944,7 +944,7 @@ int main (int argc, char *argv[])
|
|||
port_name3[i] = 'A';
|
||||
}
|
||||
// And last one is the terminating '0'
|
||||
port_name3[short_port_size_max] = 0;
|
||||
port_name3[short_port_size_max-1] = 0;
|
||||
jack_port_t * test_max_port = jack_port_register(client1, port_name3,
|
||||
JACK_DEFAULT_AUDIO_TYPE,
|
||||
JackPortIsOutput, 0);
|
||||
|
|
Loading…
Reference in New Issue