[svn-commits] rmudgett: trunk r322485 - in /trunk: ./ apps/app_queue.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jun 8 15:48:06 CDT 2011
Author: rmudgett
Date: Wed Jun 8 15:48:03 2011
New Revision: 322485
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=322485
Log:
Merged revisions 322484 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r322484 | rmudgett | 2011-06-08 15:46:55 -0500 (Wed, 08 Jun 2011) | 15 lines
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:
trunk/ (props changed)
trunk/apps/app_queue.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=322485&r1=322484&r2=322485
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Wed Jun 8 15:48:03 2011
@@ -3482,7 +3482,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 svn-commits
mailing list