Summary: | ASTERISK-14094: [patch] Email notification of voicemail segfaults Asterisk | ||
Reporter: | Alec Davis (alecdavis) | Labels: | |
Date Opened: | 2009-05-08 06:31:46 | Date Closed: | 2009-05-11 14:33:21 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_voicemail |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) gdb.090509.txt ( 1) gdb.txt | |
Description: | Asterisk segfaults as soon as a message has been left, when a mailbox has an '@' in the name/description in voicemail.conf Although this could be deemed a configuration error, Asterisk shouldn't segfault at it. ****** ADDITIONAL INFORMATION ****** in file /etc/asterisk/voicemai.conf there is an '@' in some of my names. If I remove it, the segfault doesn't happen. ... [default] 520 => 520,Alec Davis @ gxp2000 , root@localhost .... | ||
Comments: | By: Alec Davis (alecdavis) 2009-05-08 07:00:21 gdb.txt uploaded, after recompile with menuselect compiler flags "DONT_OPTIMIZE", "MALLOC_DEBUG" set By: Tilghman Lesher (tilghman) 2009-05-08 12:15:11 I suspect the '@' isn't the cause, because it's specifically handled in the noted routine. By: Tilghman Lesher (tilghman) 2009-05-08 12:17:31 in gdb: p *buf p (*buf)->len p (*buf)->used By: Alec Davis (alecdavis) 2009-05-09 03:49:38 New core dump, with additional debug as requested. By: Alec Davis (alecdavis) 2009-05-09 06:40:31 It turns out that if the fullname in voicemail.conf contains any of the following; ()<>@,:;/\"[]?.=_ that ast_str_encode_mime gets called and will segfault at the line: ast_str_append(end, maxlen, "%s%s?=%s", first_section ? "" : " ", ast_str_buffer(tmp), ast_str_strlen(tmp) + postamble > 74 ? " " : ""); Another example line from voicemail.conf that will segfault: 520 => 520,Alec Davis [Room 1], root@localhost By: Tilghman Lesher (tilghman) 2009-05-11 14:20:52 What SVN revision are you using? By: Digium Subversion (svnbot) 2009-05-11 14:32:16 Repository: asterisk Revision: 193678 U trunk/apps/app_voicemail.c ------------------------------------------------------------------------ r193678 | tilghman | 2009-05-11 14:32:16 -0500 (Mon, 11 May 2009) | 4 lines Don't nullify an ast_str pointer. (closes issue ASTERISK-14094) Reported by: alecdavis ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=193678 By: Digium Subversion (svnbot) 2009-05-11 14:33:21 Repository: asterisk Revision: 193684 _U branches/1.6.2/ ------------------------------------------------------------------------ r193684 | tilghman | 2009-05-11 14:33:20 -0500 (Mon, 11 May 2009) | 10 lines Blocked revisions 193678 via svnmerge ........ r193678 | tilghman | 2009-05-11 14:32:13 -0500 (Mon, 11 May 2009) | 4 lines Don't nullify an ast_str pointer. (closes issue ASTERISK-14094) Reported by: alecdavis ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=193684 |