mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-07 15:19:24 -07:00
Merge "chan_dahdi.c: Fix bounds check regression."
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user