libcurl stream not free properly
--------------------------------
Key: AXIS2C-1105
URL: https://issues.apache.org/jira/browse/AXIS2C-1105
Project: Axis2-C
Issue Type: Bug
Components: core/transport
Affects Versions: 1.3.0, 1.3.1
Environment: CentOS 4.6
Reporter: Steve Nairn
When libcurl is enabled the function axis2_libcurl_send() in axis2_libcurl.c
creates an in stream by calling axutil_stream_create_libcurl(). This stream
should be freed with libcurl_stream_free() but it is freed with
axutil_stream_free_void_arg() instead.
In most cases this is not an issue. However, when
axutil_stream_create_libcurl() allocates space for a libcurl_stream_impl struct
it does not initialise the part of the struct that holds the axutil_stream_t.
If the space that is allocated happens to hold values such that the stream_type
field of the axutil_stream_t is set to zero and the buffer_head field is set to
non-zero then this will cause a segmentation violation (this is how the bug
affected me).
The solution is to set the free func on the property to libcurl_stream_free()
rather than axutil_stream_free_void_arg(). I'll try and attach a patch against
a Subversion checkout to this issue (I'm pretty new to Jira).
Cheers,
Steve Nairn
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]