fix coverity issue

This commit is contained in:
Andre Puschmann 2018-02-27 14:24:27 +01:00
parent bedd154fb1
commit 252174865c
2 changed files with 5 additions and 2 deletions

View File

@ -118,7 +118,8 @@ mme_gtpc::send_create_session_request(uint64_t imsi, uint32_t mme_ue_s1ap_id)
m_mme_gtpc_log->console("Creating Session Response -- IMSI: %015lu \n", imsi);
m_mme_gtpc_log->console("Creating Session Response -- MME control TEID: %lu \n", cs_req->sender_f_teid.teid);
// APN
strcpy(cs_req->apn, m_s1ap->m_s1ap_args.mme_apn.c_str());
strncpy(cs_req->apn, m_s1ap->m_s1ap_args.mme_apn.c_str(), sizeof(cs_req->apn)-1);
cs_req->apn[sizeof(cs_req->apn)-1] = 0;
// RAT Type
//cs_req->rat_type = srslte::GTPC_RAT_TYPE::EUTRAN;

View File

@ -38,7 +38,9 @@ boost::mutex s1ap_instance_mutex;
s1ap::s1ap():
m_s1mme(-1),
m_next_mme_ue_s1ap_id(1)
m_next_mme_ue_s1ap_id(1),
m_mme_gtpc(NULL),
m_pool(NULL)
{
}