diff options
author | Harald Welte <laforge@gnumonks.org> | 2014-08-25 10:05:31 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2014-08-25 10:05:55 +0200 |
commit | e0e9b30f5cbda675b5504caab88654d89fa47cae (patch) | |
tree | da9c1564abad442db96c7093abcb66d106140a78 /src/common | |
parent | 68b9b376cf6d3a983cc6b06d7aef189c30b952f2 (diff) |
tx_power.c: fix potential array out-of-bounds access
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/tx_power.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/tx_power.c b/src/common/tx_power.c index be96c3d3..862450bb 100644 --- a/src/common/tx_power.c +++ b/src/common/tx_power.c @@ -33,7 +33,7 @@ static int get_pa_drive_level_mdBm(const struct power_amp *pa, int desired_p_out_mdBm, unsigned int arfcn) { - if (arfcn > ARRAY_SIZE(pa->calib.gain_mdB)) + if (arfcn >= ARRAY_SIZE(pa->calib.gain_mdB)) return INT_MIN; /* FIXME: temperature compensation */ |