summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-04-04 16:24:31 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-04-04 16:26:50 +0200
commitb2b13f69ae5916477ea3f6e37b57b52a83ac5a63 (patch)
tree0a17374b649dc2cbcad5195e5dc4cbf86a7b88ed /src
parent270c73c11fa66171a9d85e22ce868b9669960c0b (diff)
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);
Diffstat (limited to 'src')
-rw-r--r--src/mncc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mncc.c b/src/mncc.c
index 47dd72b..4778424 100644
--- a/src/mncc.c
+++ b/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;