jack: Include NULL in return value of jack_client_name_size()

This fixes an assertion failure in PortAudio's JACK backend when the
monitor client name is longer than than JACK_CLIENT_NAME_SIZE.
This commit is contained in:
Tasos Sahanidis 2022-08-20 09:41:02 +03:00 committed by Wim Taymans
parent 1ea1d525c1
commit 7884ff82db

View file

@ -3584,8 +3584,9 @@ char *jack_get_internal_client_name (jack_client_t *client,
SPA_EXPORT SPA_EXPORT
int jack_client_name_size (void) int jack_client_name_size (void)
{ {
pw_log_trace("%d", JACK_CLIENT_NAME_SIZE); /* The JACK API specifies that this value includes the final NULL character. */
return JACK_CLIENT_NAME_SIZE; pw_log_trace("%d", JACK_CLIENT_NAME_SIZE+1);
return JACK_CLIENT_NAME_SIZE+1;
} }
SPA_EXPORT SPA_EXPORT