Summary: | ASTERISK-08083: "L" parameter causes asterisk crash | ||
Reporter: | Di-Shi Sun (homesick) | Labels: | |
Date Opened: | 2006-11-14 12:41:08.000-0600 | Date Closed: | 2006-11-14 14:09:51.000-0600 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_dial |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) app_dial.diff | |
Description: | test bed: cisco gateway->asterisk->cisco gateway, SIP Only two lines in extensions.conf [GeneralProxy] exten => _XXXX.,1,Dial(SIP/1234567890@172.16.34.103,15) fine. [GeneralProxy] exten => _XXXX.,1,Dial(SIP/1234567890@172.16.34.103,15,L(10000)) crash. (gdb) bt #0 0x0049fd4c in ____strtol_l_internal () from /lib/tls/libc.so.6 #1 0x0049fadf in __strtol_internal () from /lib/tls/libc.so.6 #2 0xf5eb2068 in dial_exec_full (chan=0x8350dd0, data=0xf4a40030, peerflags=0xf4a3be64) at stdlib.h:333 #3 0xf5eb6dee in dial_exec (chan=0x597380, data=0x583d40) at app_dial.c:1681 #4 0x080c0730 in pbx_extension_helper (c=0x8350dd0, con=0x0, context=0x8350f50 "GeneralProxy", exten=0x8350fa0 "4045266062", priority=1, label=0x0, callerid=0x8333928 "4045266061", action=4104388656) at pbx.c:503 ASTERISK-1 0x080c1acf in __ast_pbx_run (c=0x8350dd0) at pbx.c:2162 ASTERISK-2 0x080c399e in pbx_thread (data=0x597380) at pbx.c:2475 ASTERISK-3 0x080efea5 in dummy_start (data=0x583d40) at utils.c:545 ASTERISK-4 0x006ca1d5 in start_thread () from /lib/tls/libpthread.so.0 ASTERISK-5 0x005392da in clone () from /lib/tls/libc.so.6 | ||
Comments: | By: Di-Shi Sun (homesick) 2006-11-14 13:20:17.000-0600 I think I know what happened. static int do_timelimit(struct ast_channel *chan, struct ast_bridge_config *config, char *parse, unsigned int *calldurationlimit) { char *limit_str, *warning_str, *warnfreq_str; const char *var; int play_to_caller=0,play_to_callee=0; int delta; limit_str = strsep(&warnfreq_str, ":"); warning_str = strsep(&warnfreq_str, ":"); warnfreq_str = parse; ... warnfreq_str should be initialized as parse before using it. A resonable fix should also dup parse instead of directly changing the content of it (by strsep). By: Di-Shi Sun (homesick) 2006-11-14 13:44:02.000-0600 a quick fix has been posted. By: Joshua C. Colp (jcolp) 2006-11-14 14:09:50.000-0600 Fixed in trunk as of revision 47623. Thanks! |