[asterisk-bugs] [JIRA] (ASTERISK-20854) app_minivm core dump in ast_str_encode_mime

Rusty Newton (JIRA) noreply at issues.asterisk.org
Fri Jan 4 13:17:45 CST 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=201114#comment-201114 ] 

Rusty Newton commented on ASTERISK-20854:
-----------------------------------------

Acknowledged this issue. One of the community developers working with app_minivm will need to look it over and provide a patch.
                
> app_minivm core dump in ast_str_encode_mime
> -------------------------------------------
>
>                 Key: ASTERISK-20854
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20854
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_minivm
>    Affects Versions: 10.9.0
>         Environment: Centos 6.3
>            Reporter: Chris Warr
>
> ast_str_encode is called from sendmail if an address contains any characters that need mime-encoding.  In my case the user name was "Laura (Reception)".
> It looks like when the ast_str_encode_mime function was converted to use the ast_str structure someone didn't remove a string initialisation.  The bug occurs from *end = '\0' clearing out the structure and later it's set which core dumps.
> 	struct ast_str *tmp = ast_str_alloca(80);
> 	int first_section = 1;
> 	*end = '\0';                  <-- This should be deleted
> 	ast_str_reset(*end);
> ...
> ...
>    // Will core dump a functions down through here
>    ast_str_append(end, maxlen, "%s%s?=%s", first_section ? "" : " ", ast_str_buffer(tmp), ast_str_strlen(tmp) + postamble > 74 ? " " : "");
> This bug is still in the 11 branch, however I am using 10.9.
> I've removed this line, recompiled at tested successfully.
> Regards,
> Chris.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list