[Asterisk-code-review] chan dahdi.c: Fix bounds check regression. (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Wed Dec 14 14:23:45 CST 2016
Richard Mudgett has uploaded a new change for review. ( https://gerrit.asterisk.org/4629 )
Change subject: chan_dahdi.c: Fix bounds check regression.
......................................................................
chan_dahdi.c: Fix bounds check regression.
Caused by ASTERISK-25494
Change-Id: I1fc408c1a083745ff59da5c4113041bbfce54bcb
---
M channels/chan_dahdi.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/29/4629/1
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 2e139a2..6d740d0 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -18905,8 +18905,8 @@
}
/* 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 */
--
To view, visit https://gerrit.asterisk.org/4629
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fc408c1a083745ff59da5c4113041bbfce54bcb
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-code-review
mailing list