Commit 02f74a65 authored by Stephane Letz's avatar Stephane Letz
Browse files

String management fix.

parent f3cf9d6f
......@@ -119,7 +119,7 @@ static jack_shm_info_t registry_info = { /* SHM info for the registry */
/* pointers to registry header and array */
static jack_shm_header_t *jack_shm_header = NULL;
static jack_shm_registry_t *jack_shm_registry = NULL;
static char jack_shm_server_prefix[JACK_SERVER_NAME_SIZE] = "";
static char jack_shm_server_prefix[JACK_SERVER_NAME_SIZE+1] = "";
/* jack_shm_lock_registry() serializes updates to the shared memory
* segment JACK uses to keep track of the SHM segments allocated to
......
......@@ -123,7 +123,7 @@ extern "C"
pid_t pid; /* process ID */
#endif
char name[JACK_SERVER_NAME_SIZE];
char name[JACK_SERVER_NAME_SIZE+1];
}
jack_shm_server_t;
......
......@@ -116,8 +116,8 @@ int JackAlsaDriver::Attach()
JackPort* port;
jack_port_id_t port_index;
unsigned long port_flags = (unsigned long)CaptureDriverFlags;
char name[REAL_JACK_PORT_NAME_SIZE];
char alias[REAL_JACK_PORT_NAME_SIZE];
char name[REAL_JACK_PORT_NAME_SIZE+1];
char alias[REAL_JACK_PORT_NAME_SIZE+1];
assert(fCaptureChannels < DRIVER_PORT_NUM);
assert(fPlaybackChannels < DRIVER_PORT_NUM);
......
......@@ -31,12 +31,12 @@ namespace Jack {
private:
char alias[REAL_JACK_PORT_NAME_SIZE];
char alias[REAL_JACK_PORT_NAME_SIZE+1];
struct pollfd *alsa_poll_fds;
int alsa_poll_fd_count;
int fds[2];
unsigned short io_mask;
char name[REAL_JACK_PORT_NAME_SIZE];
char name[REAL_JACK_PORT_NAME_SIZE+1];
struct pollfd *queue_poll_fd;
protected:
......
......@@ -2029,7 +2029,7 @@
4BF8D2470834F20600C94B91 /* testSem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = testSem.cpp; path = ../tests/testSem.cpp; sourceTree = SOURCE_ROOT; };
4BF8FB0D08AC88EF00D1A344 /* JackFrameTimer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JackFrameTimer.cpp; path = ../common/JackFrameTimer.cpp; sourceTree = SOURCE_ROOT; };
4BF8FB0E08AC88EF00D1A344 /* JackFrameTimer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JackFrameTimer.h; path = ../common/JackFrameTimer.h; sourceTree = SOURCE_ROOT; };
4BFA5E980DEC4D9C00FA4CDB /* testSem */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testSem; sourceTree = BUILT_PRODUCTS_DIR; };
4BFA5E980DEC4D9C00FA4CDB /* testMutex */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testMutex; sourceTree = BUILT_PRODUCTS_DIR; };
4BFA5E9E0DEC4DD900FA4CDB /* testMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = testMutex.cpp; path = ../tests/testMutex.cpp; sourceTree = SOURCE_ROOT; };
4BFA828C0DF6A9E40087B4E1 /* jack_evmon */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_evmon; sourceTree = BUILT_PRODUCTS_DIR; };
4BFA829F0DF6A9E40087B4E1 /* jack_bufsize */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jack_bufsize; sourceTree = BUILT_PRODUCTS_DIR; };
......@@ -2837,7 +2837,7 @@
4B363F1E0DEB0A6A001F72D9 /* jack_monitor_client */,
4B363F350DEB0BD1001F72D9 /* jack_showtime */,
4B363F720DEB0D4E001F72D9 /* jack_impulse_grabber */,
4BFA5E980DEC4D9C00FA4CDB /* testSem */,
4BFA5E980DEC4D9C00FA4CDB /* testMutex */,
4BFA828C0DF6A9E40087B4E1 /* jack_evmon */,
4BFA829F0DF6A9E40087B4E1 /* jack_bufsize */,
4BFA82AB0DF6A9E40087B4E1 /* jack_rec */,
......@@ -6200,7 +6200,7 @@
name = "testMutex Universal";
productInstallPath = /usr/local/bin;
productName = testSem;
productReference = 4BFA5E980DEC4D9C00FA4CDB /* testSem */;
productReference = 4BFA5E980DEC4D9C00FA4CDB /* testMutex */;
productType = "com.apple.product-type.tool";
};
4BFA82820DF6A9E40087B4E1 /* jack_evmon 64 bits */ = {
......
......@@ -2262,8 +2262,8 @@ int JackCoreAudioDriver::Attach()
UInt32 size;
Boolean isWritable;
char channel_name[64];
char name[REAL_JACK_PORT_NAME_SIZE];
char alias[REAL_JACK_PORT_NAME_SIZE];
char name[REAL_JACK_PORT_NAME_SIZE+1];
char alias[REAL_JACK_PORT_NAME_SIZE+1];
jack_log("JackCoreAudioDriver::Attach : fBufferSize %ld fSampleRate %ld", fEngineControl->fBufferSize, fEngineControl->fSampleRate);
......
......@@ -70,7 +70,7 @@ JackCoreMidiPort::Initialize(const char *alias_name, const char *client_name,
const char *driver_name, int index,
MIDIEndpointRef endpoint, bool is_output)
{
char endpoint_name[REAL_JACK_PORT_NAME_SIZE];
char endpoint_name[REAL_JACK_PORT_NAME_SIZE+1];
CFStringRef endpoint_name_ref;
int num = index + 1;
Boolean res;
......
......@@ -31,9 +31,9 @@ namespace Jack {
private:
char alias[REAL_JACK_PORT_NAME_SIZE];
char alias[REAL_JACK_PORT_NAME_SIZE+1];
char name[REAL_JACK_PORT_NAME_SIZE+1];
bool initialized;
char name[REAL_JACK_PORT_NAME_SIZE];
protected:
......
......@@ -55,8 +55,8 @@ class JackOSSAdapter : public JackAudioAdapterInterface, public JackRunnableInte
JackThread fThread;
char fCaptureDriverName[JACK_CLIENT_NAME_SIZE + 1];
char fPlaybackDriverName[JACK_CLIENT_NAME_SIZE + 1];
char fCaptureDriverName[JACK_CLIENT_NAME_SIZE+1];
char fPlaybackDriverName[JACK_CLIENT_NAME_SIZE+1];
int fInFD;
int fOutFD;
......
......@@ -80,7 +80,7 @@ class JackWinNamedPipeServerChannel : public JackRunnableInterface
JackWinNamedPipeServer fRequestListenPipe; // Pipe to create request socket for the client
JackServer* fServer;
JackThread fThread; // Thread to execute the event loop
char fServerName[JACK_SERVER_NAME_SIZE];
char fServerName[JACK_SERVER_NAME_SIZE+1];
std::list<JackClientPipeThread*> fClientList;
......
......@@ -31,8 +31,8 @@ namespace Jack {
protected:
char alias[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char alias[REAL_JACK_PORT_NAME_SIZE+1];
char name[REAL_JACK_PORT_NAME_SIZE+1];
public:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment