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.
changes/26/126/1
Holger Hans Peter Freyther 7 years ago
parent 3d2787646b
commit c313ab0f6b
  1. 2
      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;

Loading…
Cancel
Save