aboutsummaryrefslogtreecommitdiffstats
path: root/src/input
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-06 18:54:58 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-06 18:54:58 +0200
commitf69b8123f9507d1c854d265c4950894843fd9b85 (patch)
treefe0cb001a90ca7b311f3e6be8a8ecb303995aefe /src/input
parent219a6a4add60d41ad08730cdf506a2f63b0015a0 (diff)
dahdi: Fix potential but unlikely out of bounds access
The line->port_nr is compared to the array size of the span config and then the array can be potentially accessed one element outside of the array. Fixes: Coverity 1042368
Diffstat (limited to 'src/input')
-rw-r--r--src/input/dahdi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/input/dahdi.c b/src/input/dahdi.c
index 8d3e060..030bef3 100644
--- a/src/input/dahdi.c
+++ b/src/input/dahdi.c
@@ -401,7 +401,7 @@ static void dahdi_vty_show(struct vty *vty, struct e1inp_line *line)
{
struct span_cfg *scfg;
- if (line->port_nr > ARRAY_SIZE(span_cfgs))
+ if (line->port_nr >= ARRAY_SIZE(span_cfgs))
return;
scfg = span_cfgs[line->port_nr];