diff options
author | Thomas Brand <tom@trellis.ch> | 2019-01-26 04:26:10 +0100 |
---|---|---|
committer | Thomas Brand <tom@trellis.ch> | 2019-01-26 04:26:10 +0100 |
commit | 1050436b33a3a5d27fa752228fe302028d67fc03 (patch) | |
tree | 8e5aad4eecb3e7bc57b89b2007c136e97fff1453 /posix | |
parent | 667e06890ef47a533a616a5f5661a1d2cae5ffdb (diff) | |
download | jack2-1050436b33a3a5d27fa752228fe302028d67fc03.tar.gz |
Use memset to fill buffer. Add test marker.
Notes:
The name length test still fails.
jack_client_open() will only allow 63 printable chars (unlike expected 64 == JACK_CLIENT_NAME_SIZE).
This difference isn't explained by the terminating NULL character. jack_client_name_size() takes care of that (returns JACK_CLIENT_NAME_SIZE + 1).
char arrays are initialized like arr[JACK_CLIENT_NAME_SIZE + 1] in many files und truncated like arr[JACK_CLIENT_NAME_SIZE].
Probable reason for 63: ':' is part of the client name and implicitely added later.
Name used by caller does not include ':' thus jack_client_open() will allow only JACK_CLIENT_NAME_SIZE - 1 printable chars.
This line in common/JackConstants.h gives a hint that ':' might be counted in for JACK_CLIENT_NAME_SIZE
#define REAL_JACK_PORT_NAME_SIZE JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE // full name like "client_name:short_port_name"
Currently many char arguments are described like
@param client_name of at most jack_client_name_size() characters
This can be confusing in two ways:
-jack_client_name_size() does include the NULL so it's one less 'payload' character
-if the returned size is used exactly as described for function jack_client_name_size() including NULL,
it won't work with jack_client_open() or jack_port_register() etc. because of another reduction (eventually for the ":").
!! This needs to be verified and documentation needs to be reviewed. !!
Diffstat (limited to 'posix')
0 files changed, 0 insertions, 0 deletions