mncc: Use snprintf correctly create format specifier

I was focusing so much on the length that I didn't notice the
wrong usage of snprintf. Correct it.

Warning on Ubuntu:
mncc.c:679:3: warning: format not a string literal and no format arguments [-Wformat-security]
   snprintf(mncc.imsi, 15, called);
This commit is contained in:
Holger Hans Peter Freyther 2016-04-04 16:24:31 +02:00
parent 270c73c11f
commit b2b13f69ae
1 changed files with 1 additions and 1 deletions

View File

@ -676,7 +676,7 @@ int mncc_create_remote_leg(struct mncc_connection *conn, struct call *call,
memcpy(&mncc.calling.number, calling, sizeof(mncc.calling.number));
if (conn->app->use_imsi_as_id) {
snprintf(mncc.imsi, 15, called);
snprintf(mncc.imsi, 15, "%s", called);
} else {
mncc.fields |= MNCC_F_CALLED;
mncc.called.plan = 1;