[asterisk-commits] rmudgett: branch 1.8 r322484 - /branches/1.8/apps/app_queue.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jun 8 15:46:59 CDT 2011
Author: rmudgett
Date: Wed Jun 8 15:46:55 2011
New Revision: 322484
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=322484
Log:
Ring all queue with more than 255 agents will cause crash.
1. Create a ring-all queue with 500 permanent agents.
2. Call it.
3. Asterisk will crash.
The watchers array in app_queue.c has a hard limit of 255. Bounds
checking is not done on this array. No sane person should put 255 people
in a ring-all queue, but we should not crash anyway.
* Added bounds checking to the watchers array.
JIRA AST-464
JIRA SWP-2903
Modified:
branches/1.8/apps/app_queue.c
Modified: branches/1.8/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_queue.c?view=diff&rev=322484&r1=322483&r2=322484
==============================================================================
--- branches/1.8/apps/app_queue.c (original)
+++ branches/1.8/apps/app_queue.c Wed Jun 8 15:46:55 2011
@@ -3486,7 +3486,9 @@
if (o->stillgoing) { /* Keep track of important channels */
stillgoing = 1;
if (o->chan) {
- watchers[pos++] = o->chan;
+ if (pos < AST_MAX_WATCHERS) {
+ watchers[pos++] = o->chan;
+ }
if (!start)
start = o;
else
More information about the asterisk-commits
mailing list