# HG changeset patch # User Chris Cannam # Date 1411993633 -3600 # Node ID 7b2dd0d4c366057ce25547a4015f3a76981abedc # Parent 49d5e885f58e6b572c87b001e073fcd40875c1b3 Correct some really stupid fixed-length string stuff, including a genuine stack overflow that causes a crash on OS/X for certain colour 3d plot data. diff -r 49d5e885f58e -r 7b2dd0d4c366 audioio/AudioJACKTarget.cpp --- a/audioio/AudioJACKTarget.cpp Wed Sep 24 10:00:56 2014 +0100 +++ b/audioio/AudioJACKTarget.cpp Mon Sep 29 13:27:13 2014 +0100 @@ -367,11 +367,12 @@ #endif while ((int)m_outputs.size() < channels) { - - char name[20]; + + const int namelen = 30; + char name[namelen]; jack_port_t *port; - sprintf(name, "out %d", int(m_outputs.size() + 1)); + snprintf(name, namelen, "out %d", int(m_outputs.size() + 1)); port = jack_port_register(m_client, name,