Skip to content
Snippets Groups Projects
Commit 0e2406f0 authored by DONG Anyuan's avatar DONG Anyuan
Browse files

Remove Coverity Scan CID 60241 (Passing &eplmn to function...

Remove Coverity Scan CID 60241 (Passing &eplmn to function emm_proc_attach_accept which uses it as an array. This might corrupt or misinterpret adjacent memory locations.)
parent 3adb2efd
No related branches found
No related tags found
No related merge requests found
......@@ -211,21 +211,21 @@ int emm_recv_attach_accept(nas_user_t *user, attach_accept_msg *msg, int *emm_ca
/* Get the list of equivalent PLMNs */
int n_eplmns = 0;
plmn_t eplmn[1];
plmn_t eplmn;
if (msg->presencemask & ATTACH_ACCEPT_EQUIVALENT_PLMNS_PRESENT) {
n_eplmns = 1;
eplmn[0].MCCdigit1 = msg->equivalentplmns.mccdigit1;
eplmn[0].MCCdigit2 = msg->equivalentplmns.mccdigit2;
eplmn[0].MCCdigit3 = msg->equivalentplmns.mccdigit3;
eplmn[0].MNCdigit1 = msg->equivalentplmns.mncdigit1;
eplmn[0].MNCdigit2 = msg->equivalentplmns.mncdigit2;
eplmn[0].MNCdigit3 = msg->equivalentplmns.mncdigit3;
eplmn.MCCdigit1 = msg->equivalentplmns.mccdigit1;
eplmn.MCCdigit2 = msg->equivalentplmns.mccdigit2;
eplmn.MCCdigit3 = msg->equivalentplmns.mccdigit3;
eplmn.MNCdigit1 = msg->equivalentplmns.mncdigit1;
eplmn.MNCdigit2 = msg->equivalentplmns.mncdigit2;
eplmn.MNCdigit3 = msg->equivalentplmns.mncdigit3;
}
/* Execute attach procedure accepted by the network */
rc = emm_proc_attach_accept(user, T3412, T3402, T3423, n_tais, tai, pguti,
n_eplmns, eplmn,
n_eplmns, &eplmn,
&msg->esmmessagecontainer.esmmessagecontainercontents);
LOG_FUNC_RETURN (rc);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment