diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-12-14 14:21:47 -0600 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-12-14 14:24:18 -0600 |
commit | 9404efa6f42fcdbf1e676ce5a43477c68e16162d (patch) | |
tree | fb5e4b9cee9234221178c4ca688a1033617cf591 /channels/chan_dahdi.c | |
parent | 31268e0a280110748f33314a2c09563c576243de (diff) |
chan_dahdi.c: Fix bounds check regression.
Caused by ASTERISK-25494
Change-Id: I1fc408c1a083745ff59da5c4113041bbfce54bcb
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r-- | channels/chan_dahdi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index d224a2044..97c80c83e 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -18826,8 +18826,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 */ |