[asterisk-commits] moy: branch moy/mfcr2 r154138 - /team/moy/mfcr2/channels/chan_dahdi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Nov 3 21:27:22 CST 2008
Author: moy
Date: Mon Nov 3 21:27:21 2008
New Revision: 154138
URL: http://svn.digium.com/view/asterisk?view=rev&rev=154138
Log:
validate max amount of r2links properly
Modified:
team/moy/mfcr2/channels/chan_dahdi.c
Modified: team/moy/mfcr2/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/channels/chan_dahdi.c?view=diff&rev=154138&r1=154137&r2=154138
==============================================================================
--- team/moy/mfcr2/channels/chan_dahdi.c (original)
+++ team/moy/mfcr2/channels/chan_dahdi.c Mon Nov 3 21:27:21 2008
@@ -9103,8 +9103,8 @@
static struct dahdi_mfcr2 *mfcr2_get_context(int id)
{
- if ((id < 0) || (id > sizeof(r2links))) {
- ast_log(LOG_ERROR, "Wah! you surely did not mean to do this\n.");
+ if ((id < 0) || (id >= (sizeof(r2links)/sizeof(r2links[0])))) {
+ ast_log(LOG_ERROR, "No more R2 links available!.\n.");
return NULL;
}
return &r2links[id];
@@ -15011,7 +15011,7 @@
#ifdef HAVE_OPENR2
if (reload != 1 && r2links[mfcr2_cur_context_index].protocol_context) {
mfcr2_cur_context_index++;
- }
+ }
#endif
}
More information about the asterisk-commits
mailing list