Commit 740039dd authored by Robert Schmidt's avatar Robert Schmidt

Avoid buffer overflow: initialize for multiple PRACH FD occasions

parent a9a3bda4
...@@ -567,7 +567,6 @@ int param_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi ...@@ -567,7 +567,6 @@ int param_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi
nfapi_resp.num_tlv++; nfapi_resp.num_tlv++;
nfapi_pnf_param_resp(config, &nfapi_resp); nfapi_pnf_param_resp(config, &nfapi_resp);
printf("[PNF] Sent NFAPI_PARAM_RESPONSE phy_id:%d number_of_tlvs:%u\n", req->header.phy_id, nfapi_resp.num_tlv); printf("[PNF] Sent NFAPI_PARAM_RESPONSE phy_id:%d number_of_tlvs:%u\n", req->header.phy_id, nfapi_resp.num_tlv);
printf("[PNF] param request .. exit\n");
return 0; return 0;
} }
...@@ -786,7 +785,6 @@ int nr_param_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nf ...@@ -786,7 +785,6 @@ int nr_param_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nf
nfapi_nr_pnf_param_resp(config, &nfapi_resp); nfapi_nr_pnf_param_resp(config, &nfapi_resp);
printf("[PNF] Sent NFAPI_PNF_PARAM_RESPONSE phy_id:%d number_of_tlvs:%u\n", req->header.phy_id, nfapi_resp.num_tlv); printf("[PNF] Sent NFAPI_PNF_PARAM_RESPONSE phy_id:%d number_of_tlvs:%u\n", req->header.phy_id, nfapi_resp.num_tlv);
printf("[PNF] param request .. exit\n");
return 0; return 0;
} }
......
...@@ -3137,7 +3137,7 @@ static uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, ...@@ -3137,7 +3137,7 @@ static uint8_t unpack_nr_config_request(uint8_t **ppReadPackedMsg, uint8_t *end,
(nfapi_nr_max_num_of_symbol_per_slot_t *)malloc(14 * sizeof(nfapi_nr_max_num_of_symbol_per_slot_t)); (nfapi_nr_max_num_of_symbol_per_slot_t *)malloc(14 * sizeof(nfapi_nr_max_num_of_symbol_per_slot_t));
} }
pNfapiMsg->prach_config.num_prach_fd_occasions_list = pNfapiMsg->prach_config.num_prach_fd_occasions_list =
(nfapi_nr_num_prach_fd_occasions_t *)malloc(sizeof(nfapi_nr_num_prach_fd_occasions_t)); (nfapi_nr_num_prach_fd_occasions_t *)calloc(10, sizeof(nfapi_nr_num_prach_fd_occasions_t));
// unpack TLVs // unpack TLVs
unpack_tlv_t unpack_fns[] = { unpack_tlv_t unpack_fns[] = {
......
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