From 0487631c769060e4f24e82b8cf680ebcdd9d2562 Mon Sep 17 00:00:00 2001 From: Wilson Thong <wilsonthong@astri.org> Date: Tue, 28 Mar 2017 10:38:46 +0800 Subject: [PATCH] #221 fixed crash when processing false DCI1A due to incorrect HARQ-PID checking --- openair1/PHY/LTE_TRANSPORT/dci_tools.c | 4 ++-- openair1/PHY/LTE_TRANSPORT/ulsch_coding.c | 2 +- openair1/PHY/LTE_TRANSPORT/ulsch_modulation.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index 2a8e4425635..6c0c4ff94cf 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -4799,7 +4799,7 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format, return(0); } - if(harq_pid >8) + if(harq_pid>=8) { LOG_I(PHY,"bad harq id \n"); return(0); @@ -5013,7 +5013,7 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format, #endif // I- check dci content minimum coherency - if(harq_pid >8) + if(harq_pid>=8) { LOG_I(PHY,"bad harq pid\n"); return(0); diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c index bd49fdacb06..9ae1dc6603e 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_coding.c @@ -242,7 +242,7 @@ uint32_t ulsch_encoding(uint8_t *a, return(-1); } - if (harq_pid > 7) { + if (harq_pid >= 8) { LOG_E(PHY,"Illegal harq_pid %d\n",harq_pid); return(-1); } diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_modulation.c index a4bcd802f5c..6dced43b5f6 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_modulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_modulation.c @@ -402,7 +402,7 @@ void ulsch_modulation(int32_t **txdataF, // x1 is set in lte_gold_generic x2 = (ulsch->rnti<<14) + (subframe<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1 - if (harq_pid > 7) { + if (harq_pid>=8) { printf("ulsch_modulation.c: Illegal harq_pid %d\n",harq_pid); return; } -- GitLab