Summary: | ASTERISK-04714: GROUP_COUNT crashes if category specified and group is empty | ||
Reporter: | Mark Monnin (wrmem) | Labels: | |
Date Opened: | 2005-07-27 17:31:59 | Date Closed: | 2008-01-15 15:43:03.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) groupcount_patch.txt | |
Description: | If GROUP_COUNT is called with a category but an empty group such as "GROUP_COUNT(@foo)", it can cause Asterisk to crash. Trival fix is to protect against a NULL result from pbx_builtin_getvar_helper. Patch attached. ****** ADDITIONAL INFORMATION ****** Sample "bad" config is given below: exten => 37738,1,SayDigits(${GROUP_COUNT(@foo)}) exten => 37738,n,Wait(60) exten => 37738,n,Playback(vm-goodbye) exten => 37738,n,Hangup (Ya, I know - still need to send in a disclaimer, but this should be trivial enough anyways) | ||
Comments: | By: Russell Bryant (russell) 2005-07-27 18:37:58 Since you didn't have a disclaimer, I just wrote a patch without looking at yours. Thanks for the report! By: Digium Subversion (svnbot) 2008-01-15 15:43:03.000-0600 Repository: asterisk Revision: 6237 U trunk/funcs/func_groupcount.c ------------------------------------------------------------------------ r6237 | russell | 2008-01-15 15:43:02 -0600 (Tue, 15 Jan 2008) | 2 lines don't crash if no group is specified (bug ASTERISK-4714) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=6237 |