summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-04-01 15:42:41 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-04-01 15:42:41 +0200
commitc313ab0f6b50fc7d2bd066099624fc0a6a4454ac (patch)
tree27e4f6b8c3ca4f8042f04d508dd990256d72c1aa /src
parent3d2787646bc579c36e64542de8cecbffe98a7735 (diff)
mncc: Only copy 15 chars to leave the last one as NULL
Right now we are lucky the next byte after imsi is already set to NUL here but we should not rely on that.
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 1b2aacf..02cda9c 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -656,7 +656,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, 16, called);
+ snprintf(mncc.imsi, 15, called);
} else {
mncc.fields |= MNCC_F_CALLED;
mncc.called.plan = 1;