Commit 7a4dc635 authored by luis_pereira87's avatar luis_pereira87

Avoid segmentation fault when optional IE nAS_PDU is NULL

parent 773a35ef
...@@ -763,7 +763,9 @@ static int ngap_gNB_handle_initial_context_request(uint32_t assoc_id, uint32_t s ...@@ -763,7 +763,9 @@ static int ngap_gNB_handle_initial_context_request(uint32_t assoc_id, uint32_t s
NGAP_PDUSessionResourceSetupItemCxtReq_t *item_p = ie->value.choice.PDUSessionResourceSetupListCxtReq.list.array[i]; NGAP_PDUSessionResourceSetupItemCxtReq_t *item_p = ie->value.choice.PDUSessionResourceSetupListCxtReq.list.array[i];
msg->pdusession_param[i].pdusession_id = item_p->pDUSessionID; msg->pdusession_param[i].pdusession_id = item_p->pDUSessionID;
allocCopy(&msg->pdusession_param[i].nas_pdu, *item_p->nAS_PDU); if (item_p->nAS_PDU) {
allocCopy(&msg->pdusession_param[i].nas_pdu, *item_p->nAS_PDU);
}
allocCopy(&msg->pdusession_param[i].pdusessionTransfer, item_p->pDUSessionResourceSetupRequestTransfer); allocCopy(&msg->pdusession_param[i].pdusessionTransfer, item_p->pDUSessionResourceSetupRequestTransfer);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment