mirror of https://github.com/PentHertz/srsLTE.git
Fix possible out-of-bounds-read.
This commit is contained in:
parent
3e9590fd13
commit
f539851128
|
@ -171,9 +171,12 @@ static float get_snr_dB(uint32_t L)
|
||||||
|
|
||||||
if (isnormal(snr_dB) && L < 4) {
|
if (isnormal(snr_dB) && L < 4) {
|
||||||
return snr_dB;
|
return snr_dB;
|
||||||
|
} else if (L < 4) {
|
||||||
|
return snr_table_dB[L];
|
||||||
|
} else {
|
||||||
|
ERROR("L >= 4\n");
|
||||||
|
return 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
return snr_table_dB[L];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_case1()
|
static int test_case1()
|
||||||
|
|
Loading…
Reference in New Issue