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);
changes/26/126/1
Holger Hans Peter Freyther 7 years ago
parent 270c73c11f
commit b2b13f69ae
  1. 2
      src/mncc.c

@ -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;

Loading…
Cancel
Save