diff options
author | Joshua Colp <jcolp@digium.com> | 2016-12-19 19:48:31 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-12-19 19:48:31 -0600 |
commit | 1943ece514b0ba6988b05f20e10305c1c476d90b (patch) | |
tree | a5e048943cac4076998308e9191899ae97425b99 | |
parent | cce4c07d839e73f9df0ee85e17e26d9b4803e343 (diff) | |
parent | 9404efa6f42fcdbf1e676ce5a43477c68e16162d (diff) |
Merge "chan_dahdi.c: Fix bounds check regression."
-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 */ |