mirror of https://github.com/PentHertz/srsLTE.git
Solved possible high impact PHY out-of-bounds issues
This commit is contained in:
parent
e4f143059e
commit
28bb4709ff
|
@ -914,7 +914,7 @@ int srslte_pdsch_decode(srslte_pdsch_t* q,
|
|||
|
||||
/* Set pointers for layermapping & precoding */
|
||||
uint32_t i;
|
||||
cf_t* x[SRSLTE_MAX_LAYERS];
|
||||
cf_t** x;
|
||||
|
||||
if (q != NULL && sf_symbols != NULL && data != NULL && cfg != NULL) {
|
||||
|
||||
|
@ -978,15 +978,10 @@ int srslte_pdsch_decode(srslte_pdsch_t* q,
|
|||
|
||||
if (cfg->grant.nof_layers == nof_tb) {
|
||||
/* Skip layer demap */
|
||||
for (i = 0; i < cfg->grant.nof_layers; i++) {
|
||||
x[i] = q->d[i];
|
||||
}
|
||||
x = q->d;
|
||||
} else {
|
||||
/* number of layers equals number of ports */
|
||||
for (i = 0; i < cfg->grant.nof_layers; i++) {
|
||||
x[i] = q->x[i];
|
||||
}
|
||||
memset(&x[cfg->grant.nof_layers], 0, sizeof(cf_t*) * (SRSLTE_MAX_LAYERS - cfg->grant.nof_layers));
|
||||
x = q->x;
|
||||
}
|
||||
|
||||
// Pre-decoder
|
||||
|
|
|
@ -531,7 +531,7 @@ static int dci_blind_search(srslte_ue_dl_t* q,
|
|||
} else if (!find_dci(dci_msg, (uint32_t)nof_dci, &dci_msg[nof_dci]) &&
|
||||
!find_dci(q->pending_ul_dci_msg, q->pending_ul_dci_count, &dci_msg[nof_dci])) {
|
||||
// Save message and continue with next location
|
||||
if (q->nof_allocated_locations <= SRSLTE_MAX_DCI_MSG) {
|
||||
if (q->nof_allocated_locations < SRSLTE_MAX_DCI_MSG) {
|
||||
q->allocated_locations[q->nof_allocated_locations] = dci_msg[nof_dci].location;
|
||||
q->nof_allocated_locations++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue