Summary:ASTERISK-07376: dialling more than two * in a phone number causes a seg fault
Reporter:steve mcneill (steve_mcneill)Labels:
Date Opened:2006-07-21 05:48:30Date Closed:2006-07-23 00:22:40
Versions:Frequency of
Environment:Attachments:( 0) app_directed_pickup.diff
( 1) bt.txt
Description:when dialling a phone number such as **3, asterisk seg faults


[New Thread -1216250960 (LWP 5087)]
   -- Executing [***3@from-internal:1] Pickup("SIP/5001-09cfa2d0", "*3") in new stack
[New Thread -1216517200 (LWP 5088)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1216250960 (LWP 5087)]
0x00573c40 in pickup_exec (chan=0x9cfe1a0, data=0xb7815030) at app_directed_pickup.c:86
86                      if (!strcmp(context, PICKUPMARK)) {
(gdb) bt
#0  0x00573c40 in pickup_exec (chan=0x9cfe1a0, data=0xb7815030) at app_directed_pickup.c:86
#1  0x0807cec6 in pbx_extension_helper (c=0x9cfe1a0, con=Variable "con" is not available.
) at pbx.c:505
#2  0x0807e1af in __ast_pbx_run (c=0x9cfe1a0) at pbx.c:2155
#3  0x0808003e in pbx_thread (data=0x9cfe1a0) at pbx.c:2466
#4  0x080c4245 in dummy_start (data=0x40404040) at utils.c:528
ASTERISK-1  0x008a1371 in start_thread () from /lib/tls/libpthread.so.0
ASTERISK-2  0x007a29be in clone () from /lib/tls/libc.so.6
Comments:By: Serge Vecher (serge-v) 2006-07-21 09:00:10

was Asterisk built with DONT OPTIMIZE option in menuselect? If not, please redo the backtrace and _attach_ to the report. Thanks.

By: steve mcneill (steve_mcneill) 2006-07-22 20:50:04

no options were selected under "compiler flags"

attached the backtrace as requested.



By: Anthony LaMantia (alamantia) 2006-07-23 00:13:50

there was bad use of the unchecked pointer "context" after a strchr.

By: Russell Bryant (russell) 2006-07-23 00:22:39

fixed in the trunk in revision 38118, but with my own patch

alamantia: In the future, for us to be able to even look at your patch, you must have a disclaimer on file with Digium and also note in the bug report.  Thanks!