diff options
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r-- | channels/chan_dahdi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index c17e4f891..697c720e3 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -18832,6 +18832,11 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct cadence_is_ok = 0; } + /* 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; + } + /* Ring cadences cannot be negative */ for (i = 0; i < element_count; i++) { if (c[i] == 0) { |