summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-12-19 18:27:48 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-12-19 18:27:48 -0600
commit2b675ce12227007172673d6e1bac1cb70bf22fe1 (patch)
tree797691e79aa11e74e34c731da441dd8d358440e6 /channels
parent4a8766f490b5c2be19de93abf0b9453621a7b496 (diff)
parent4b285d226d2e9d92f1be53e84435c7d4cbf290be (diff)
Merge "chan_dahdi.c: Fix bounds check regression." into 13
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 2e139a234..6d740d064 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -18905,8 +18905,8 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
}
/* This check is only needed to satisfy the compiler that element_count can't cause an out of bounds */
- if (element_count >= ARRAY_LEN(c)) {
- element_count = ARRAY_LEN(c) - 1;
+ if (element_count > ARRAY_LEN(c)) {
+ element_count = ARRAY_LEN(c);
}
/* Ring cadences cannot be negative */