Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.3.0, 1.4.0
-
None
-
CentOS 4.6
Description
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