Commit 813a21e5 authored by Raymond Knopp's avatar Raymond Knopp

fix out-of-bound access in dci_tools.c (coherency check)

parent bddf6304
......@@ -4726,44 +4726,27 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format,
break;
}
}
else
if(dci_format == format1)
{
NPRB=conv_nprb(rah,rballoc,N_RB_DL);
switch (N_RB_DL) {
case 6:
NPRB = RIV2nb_rb_LUT6[rballoc];//NPRB;
if(rah)
RIV_max = RIV_max6;
else
RIV_max = 0x3F;
RIV_max = 0x3f;
break;
case 25:
NPRB = RIV2nb_rb_LUT25[rballoc];//NPRB;
if(rah)
RIV_max = RIV_max25;
else
RIV_max = 0x1FFF;
RIV_max = 0x1fff;
break;
case 50:
NPRB = RIV2nb_rb_LUT50[rballoc];//NPRB;
if(rah)
RIV_max = RIV_max50;
else
RIV_max = 0x1FFFF;
RIV_max = 0x1ffff;
break;
case 100:
NPRB = RIV2nb_rb_LUT100[rballoc];//NPRB;
if(rah)
RIV_max = RIV_max100;
else
RIV_max = 0x1FFFFFF;
RIV_max = 0x1ffffff;
break;
}
}
if(dci_format == format1)
{
NPRB = conv_nprb(rah, rballoc, N_RB_DL);
}
......
......@@ -802,6 +802,7 @@ int main(int argc, char **argv)
case 'r':
DLSCH_RB_ALLOC = atoi(optarg);
AssertFatal(DLSCH_RB_ALLOC <= 0x1ffffff,"rballoc %x is not in an allowable range (0...0x1ffffff)\n",DLSCH_RB_ALLOC);
rballocset = 1;
break;
......
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