Commit 824faeb1 authored by luis_pereira87's avatar luis_pereira87

Avoid a segmentation fault in LTE when first_uci_stats is NULL

parent 363c2bc7
...@@ -982,7 +982,14 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -982,7 +982,14 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
break; break;
} else if (first_uci_stats == NULL && eNB->uci_stats[i].rnti == 0) first_uci_stats = &eNB->uci_stats[i]; } else if (first_uci_stats == NULL && eNB->uci_stats[i].rnti == 0) first_uci_stats = &eNB->uci_stats[i];
if (uci_stats == NULL) { uci_stats=first_uci_stats; uci_stats->rnti = eNB->uci_vars[UCI_id].rnti;} if (uci_stats == NULL) {
if (first_uci_stats == NULL) {
LOG_E(PHY,"first_uci_stats is NULL\n");
return -1;
}
uci_stats=first_uci_stats;
uci_stats->rnti = eNB->uci_vars[UCI_id].rnti;
}
AssertFatal(uci_stats!=NULL,"No stat index found\n"); AssertFatal(uci_stats!=NULL,"No stat index found\n");
uci_stats->frame = frame; uci_stats->frame = frame;
......
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