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.
This commit is contained in:
parent
3d2787646b
commit
c313ab0f6b
|
@ -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));
|
memcpy(&mncc.calling.number, calling, sizeof(mncc.calling.number));
|
||||||
|
|
||||||
if (conn->app->use_imsi_as_id) {
|
if (conn->app->use_imsi_as_id) {
|
||||||
snprintf(mncc.imsi, 16, called);
|
snprintf(mncc.imsi, 15, called);
|
||||||
} else {
|
} else {
|
||||||
mncc.fields |= MNCC_F_CALLED;
|
mncc.fields |= MNCC_F_CALLED;
|
||||||
mncc.called.plan = 1;
|
mncc.called.plan = 1;
|
||||||
|
|
Loading…
Reference in New Issue