[asterisk-bugs] [JIRA] Feedback Requested: (ASTERISK-20495) Segfault in XMPP caused by the presence stanza of one of my contacts

Rusty Newton (JIRA) noreply at issues.asterisk.org
Tue Oct 2 09:34:27 CDT 2012


     [ https://issues.asterisk.org/jira/browse/ASTERISK-20495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rusty Newton updated ASTERISK-20495:
------------------------------------

    Assignee: Martin W
      Status: Waiting for Feedback  (was: Triage)

Please read https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines . Remove the patch from the description and attach as a code contribution with a signed contribution agreement.

> Segfault in XMPP caused by the presence stanza of one of my contacts
> --------------------------------------------------------------------
>
>                 Key: ASTERISK-20495
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20495
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_xmpp
>    Affects Versions: 11.0.0-beta2
>         Environment: built from head on x86_64 Ubuntu
>            Reporter: Martin W
>            Assignee: Martin W
>
> Apologies if this report is a dupe or not appropriate here; I am new to the Asterisk source so please go easy.
> Builds of asterisk were causing a segfault at start-up. I traced it to a particular contact whose presence contained the following:
> {code}
> <c ver="mac-2.2.0s" xmlns="http://jabber.org/protocol/caps"/>
> {code}
> It looks like the handling of "node" and "ver" attributes is incorrect: on res_xmpp.c:3144 (r374095).
> To get it running locally I worked around it with this:
> {code}
> Index: res/res_xmpp.c
> ===================================================================
> --- res/res_xmpp.c      (revision 374095)
> +++ res/res_xmpp.c      (working copy)
> @@ -3142,8 +3142,12 @@
>                 }
>  
>                 if ((node && strcmp(resource->caps.node, node)) || (ver && strcmp(resource->caps.version, ver))) {
> -                       ast_copy_string(resource->caps.node, node, sizeof(resource->caps.node));
> -                       ast_copy_string(resource->caps.version, ver, sizeof(resource->caps.version));
> +                       if (node) {
> +                               ast_copy_string(resource->caps.node, node, sizeof(resource->caps.node));
> +                       }
> +                       if (ver) {
> +                               ast_copy_string(resource->caps.version, ver, sizeof(resource->caps.version));
> +                       }
>  
>                         /* Google Talk places the capabilities information directly in presence, so see if it is there */
>                         if (iks_find_with_attrib(pak->x, "c", "node", "http://www.google.com/xmpp/client/caps") ||
> {code} 
> Hope this is useful.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list