[ 
https://issues.apache.org/jira/browse/AXIS2C-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitry Utkin updated AXIS2C-1628:
---------------------------------

    Attachment: echo_xml_from_buffer.tar.bz2

The patch axis2c-1628.patch causes axis2c server to crash, when 
axiom_node_create_from_buffer is used on server side.

echo_xml_from_buffer.tar.bz2 is a test service which reads axis2.xml (or any 
other xml you provide) and sends it as service response.

Before axis2c-1628.patch server does not crash, after that patch, it charshes.


To reproduce unpack echo_xml_from_buffer.tar.bz2 to samples/server/echo 
(replacing original files) compile and install.

> axiom_node_create_from_buffer modifies the buffer.
> --------------------------------------------------
>
>                 Key: AXIS2C-1628
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1628
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila
>    Affects Versions: 1.6.0
>         Environment: Linux
>            Reporter: Wes Munsil
>            Priority: Blocker
>         Attachments: axis2c-1628.patch, axis2c-1628.tar.gz, 
> echo_xml_from_buffer.tar.bz2
>
>
> axiom_node_create_from_buffer modifies the buffer. Running this code
>     char * xml =  strdup("<foo>T1 &amp; T2</foo>");
>     AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "before: %s", xml);
>     axiom_node_create_from_buffer(env, xml);
>     AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "after:  %s", xml);
> produces this output:
>     before: <foo>T1 &amp; T2</foo>
>     after:  <foo>T1 & T2; T2</foo>
> In some environments, if the strdup is omitted, a SEGV results, presumably on 
> attempting to modify the string literal.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscr...@axis.apache.org
For additional commands, e-mail: c-dev-h...@axis.apache.org

Reply via email to