summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfalkTX <falktx@gmail.com>2015-07-19 20:56:31 +0200
committerPaul Davis <paul@linuxaudiosystems.com>2016-02-11 15:39:25 -0500
commitd5ffe0820cafca99998a8ca4f8c02c5e1dd5c14d (patch)
tree14170fa376e0ff0d93a2e0e2372021c1bfa61a3f
parentf2409b1f1c2dfe3b30c7036fd5b190a51b2f851a (diff)
downloadjack1-d5ffe0820cafca99998a8ca4f8c02c5e1dd5c14d.tar.gz
Fix for -Wformat-security
-rw-r--r--jackd/engine.c4
-rw-r--r--libjack/port.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/jackd/engine.c b/jackd/engine.c
index 26df2bd..eceb2a0 100644
--- a/jackd/engine.c
+++ b/jackd/engine.c
@@ -4670,8 +4670,8 @@ jack_port_rename_notify (jack_engine_t *engine,
event.type = PortRename;
event.y.other_id = port->shared->id;
- snprintf (event.x.name, JACK_PORT_NAME_SIZE-1, old_name);
- snprintf (event.z.other_name, JACK_PORT_NAME_SIZE-1, new_name);
+ snprintf (event.x.name, JACK_PORT_NAME_SIZE-1, "%s", old_name);
+ snprintf (event.z.other_name, JACK_PORT_NAME_SIZE-1, "%s", new_name);
for (node = engine->clients; node; node = jack_slist_next (node)) {
diff --git a/libjack/port.c b/libjack/port.c
index 16a11b9..5d42b9f 100644
--- a/libjack/port.c
+++ b/libjack/port.c
@@ -813,8 +813,8 @@ jack_port_rename (jack_client_t* client, jack_port_t *port, const char *new_name
req.type = PortNameChanged;
/* re-purpose an appropriate part of the request union to convey the names */
- snprintf ((char *) req.x.connect.source_port, JACK_PORT_NAME_SIZE-1, old_name);
- snprintf ((char *) req.x.connect.destination_port, JACK_PORT_NAME_SIZE-1, new_name);
+ snprintf ((char *) req.x.connect.source_port, JACK_PORT_NAME_SIZE-1, "%s", old_name);
+ snprintf ((char *) req.x.connect.destination_port, JACK_PORT_NAME_SIZE-1, "%s", new_name);
(void) jack_client_deliver_request (client, &req);
}