Commit bdaef795 authored by gabrielC's avatar gabrielC Committed by Cedric Roux

bug fixes from Fujitsu (bugs 18, 19, 20)

```-------------------------------------------------------
bug 18

Ttile:
Probably he/she wants to copy the contents of arrays, but
this coding doesn't copy anything, moreover index overflow
occurs.

Bug Location:
u2e_t[UE_id][eNB_id]->tx_data[3]=tx[eNB_id][3];
u2e_t[UE_id][eNB_id]->rx_data[3]=rx[NB_eNB_INST+UE_id][3];

Note:
Detected by CppCheck
```

-------------------------------------------------------
bug 19

Title:
Probably he/she wants to copy the contents of arrays, but
this coding doesn't copy anything, moreover index overflow
occurs.

Bug Location:
e2u_t[eNB_id][UE_id]->tx_data[3]=tx[NB_eNB_INST+UE_id][3];
e2u_t[eNB_id][UE_id]->rx_data[3]=rx[eNB_id][3];

Note:
Detected by CppCheck
----------------------------------------------------------
bug 20

Title:
Probably he/she wants to copy the contents of arrays, but
this coding doesn't copy anything, moreover index overflow
occurs.

Bug Location:
tx_data[3]=cthread->tx_data[3];
rx_data[3]=cthread->rx_data[3];

Note:
Detected by CppCheck
----------------------------------------------------------
parent c124e32a
...@@ -284,8 +284,12 @@ void Channel_Inst(int node_id,int port,double **s_re[MAX_eNB+MAX_UE],double **s_ ...@@ -284,8 +284,12 @@ void Channel_Inst(int node_id,int port,double **s_re[MAX_eNB+MAX_UE],double **s_
u2e_t[UE_id][eNB_id]->next_slot=&next_slot; u2e_t[UE_id][eNB_id]->next_slot=&next_slot;
u2e_t[UE_id][eNB_id]->abstraction_flag=&abstraction_flag; u2e_t[UE_id][eNB_id]->abstraction_flag=&abstraction_flag;
u2e_t[UE_id][eNB_id]->frame_parms=frame_parms; u2e_t[UE_id][eNB_id]->frame_parms=frame_parms;
u2e_t[UE_id][eNB_id]->tx_data[3]=tx[eNB_id][3];
u2e_t[UE_id][eNB_id]->rx_data[3]=rx[NB_eNB_INST+UE_id][3]; for (int i=0;i<3;i++)
{
u2e_t[UE_id][eNB_id]->tx_data[i]=tx[eNB_id][i];
u2e_t[UE_id][eNB_id]->rx_data[i]=rx[NB_eNB_INST+UE_id][i];
}
if(pthread_cond_init (&downlink_cond[eNB_id][UE_id], NULL)) exit(1); if(pthread_cond_init (&downlink_cond[eNB_id][UE_id], NULL)) exit(1);
...@@ -316,8 +320,11 @@ void Channel_Inst(int node_id,int port,double **s_re[MAX_eNB+MAX_UE],double **s_ ...@@ -316,8 +320,11 @@ void Channel_Inst(int node_id,int port,double **s_re[MAX_eNB+MAX_UE],double **s_
e2u_t[eNB_id][UE_id]->next_slot=&next_slot; e2u_t[eNB_id][UE_id]->next_slot=&next_slot;
e2u_t[eNB_id][UE_id]->abstraction_flag=&abstraction_flag; e2u_t[eNB_id][UE_id]->abstraction_flag=&abstraction_flag;
e2u_t[eNB_id][UE_id]->frame_parms=frame_parms; e2u_t[eNB_id][UE_id]->frame_parms=frame_parms;
e2u_t[eNB_id][UE_id]->tx_data[3]=tx[NB_eNB_INST+UE_id][3]; for (int i=0;i<3;i++)
e2u_t[eNB_id][UE_id]->rx_data[3]=rx[eNB_id][3]; {
e2u_t[eNB_id][UE_id]->tx_data[i]=tx[NB_eNB_INST+UE_id][i];
e2u_t[eNB_id][UE_id]->rx_data[i]=rx[eNB_id][i];
}
if(pthread_cond_init (&uplink_cond[UE_id][eNB_id], NULL)) exit(1); if(pthread_cond_init (&uplink_cond[UE_id][eNB_id], NULL)) exit(1);
......
...@@ -183,8 +183,13 @@ void do_DL_sig_channel_T(void *param) ...@@ -183,8 +183,13 @@ void do_DL_sig_channel_T(void *param)
next_slot=(cthread->next_slot); next_slot=(cthread->next_slot);
abstraction_flag=*(cthread->abstraction_flag); abstraction_flag=*(cthread->abstraction_flag);
thread_id=(cthread->thread_id); thread_id=(cthread->thread_id);
tx_data[3]=cthread->tx_data[3];
rx_data[3]=cthread->rx_data[3]; for (int i=0;i<3;i++)
{
tx_data[i]=cthread->tx_data[i];
rx_data[i]=cthread->rx_data[i];
}
s32 att_eNB_id=-1; s32 att_eNB_id=-1;
s32 **txdata,**rxdata; s32 **txdata,**rxdata;
......
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