usrp_standard: fix out-of-bounds read in set_rx_freq()

Change-Id: I3e3ba31e5a68f92a330c5791ee72ad1ffab83da9
Fixes: CID#240737
This commit is contained in:
Vadim Yanitskiy 2021-10-24 23:38:42 +03:00
parent b293ceaf0f
commit 559899621b
1 changed files with 1 additions and 1 deletions

View File

@ -649,7 +649,7 @@ usrp_standard_rx::determine_rx_mux_value(const usrp_subdev_spec &ss_a, const usr
bool
usrp_standard_rx::set_rx_freq (int channel, double freq)
{
if (channel < 0 || channel > MAX_CHAN)
if (channel < 0 || channel >= MAX_CHAN)
return false;
unsigned int v =