diff --git a/prevent_free_of_static_chars.patch b/prevent_free_of_static_chars.patch new file mode 100644 index 0000000..fbcf6c4 --- /dev/null +++ b/prevent_free_of_static_chars.patch @@ -0,0 +1,46 @@ +From 35055f4b07f06621f43a704285cb90b5d80dff9f Mon Sep 17 00:00:00 2001 +From: Peter MacKinnon +Date: Fri, 16 Sep 2011 11:12:38 -0400 +Subject: [PATCH] Fix to prevent free of static chars in fault_value_str + +--- + src/msg_recv/wsf_cpp_msg_recv.cpp | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/msg_recv/wsf_cpp_msg_recv.cpp b/src/msg_recv/wsf_cpp_msg_recv.cpp +index bd0575b..abfcd60 100644 +--- a/src/msg_recv/wsf_cpp_msg_recv.cpp ++++ b/src/msg_recv/wsf_cpp_msg_recv.cpp +@@ -417,7 +417,7 @@ wsf_cpp_msg_recv_invoke_business_logic_sync( + + if (status != AXIS2_SUCCESS || is_fault) + { +- const axis2_char_t *fault_value_str = axutil_stracat(Environment::getEnv(),soapEnvelopePrefix, ":Sender"); ++ const axis2_char_t *fault_value_str = NULL; + const axis2_char_t *fault_reason_str = NULL; + const axis2_char_t *err_msg = NULL; + +@@ -436,6 +436,9 @@ wsf_cpp_msg_recv_invoke_business_logic_sync( + AXIOM_SOAP12_SOAP_FAULT_VALUE_RECEIVER; + } + } ++ else { ++ fault_value_str = axutil_stracat(Environment::getEnv(),soapEnvelopePrefix, ":Sender"); ++ } + + err_msg = AXIS2_ERROR_GET_MESSAGE(env->error); + if (err_msg) +@@ -450,7 +453,9 @@ wsf_cpp_msg_recv_invoke_business_logic_sync( + soap_fault = axiom_soap_fault_create_default_fault(env, out_body, fault_value_str, + fault_reason_str, soap_version); + +- AXIS2_FREE((Environment::getEnv()->allocator), (void*)fault_value_str); ++ if (skel_invoked) { ++ AXIS2_FREE((Environment::getEnv()->allocator), (void*)fault_value_str); ++ } + + if (fault_node) + { +-- +1.7.4.4 + diff --git a/wso2-wsf-cpp.spec b/wso2-wsf-cpp.spec index 20c1c72..dfa475e 100644 --- a/wso2-wsf-cpp.spec +++ b/wso2-wsf-cpp.spec @@ -1,3 +1,4 @@ +%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel)}} %global pkg_name wso2-wsf-cpp %global axis_name wso2-axis2 %global pkg_ver 2.1.0 @@ -24,7 +25,7 @@ Name: %{pkg_name} Summary: WSO2 Web Services Framework for C++ Version: %{pkg_ver} -Release: 4%{?dist} +Release: 5%{?dist} Group: Development/Tools License: ASL 2.0 URL: http://wso2.org/library/wsf/cpp @@ -49,6 +50,9 @@ Patch2: literal_lib_name.patch # Make stream support more complete for SSL # https://issues.apache.org/jira/browse/AXIS2C-1556 Patch3: generic_streams_for_ssl.patch +# Fix free of static buffer +# https://wso2.org/jira/browse/WSFCPP-138 +Patch4: prevent_free_of_static_chars.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: openssl-devel BuildRequires: httpd-devel @@ -164,6 +168,7 @@ Summary: An Apache HTTPD module which adds axis2 support Group: System Environment/Daemons Requires: httpd Requires: apr +Requires: httpd-mmn = %{_httpd_mmn} %description -n mod_%{axis_name} An Apache HTTPD module that adds support for axis2 WebServices. This package @@ -470,6 +475,7 @@ chmod a-x wsf_c/wsclient/LICENSE %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build %if %{build_sandesha2} @@ -614,6 +620,12 @@ mv -f %{buildroot}/%{_includedir}/*.h %{buildroot}/%{_includedir}/%{pkg_name} rm -rf %{buildroot} %changelog +* Wed Jul 11 2012 Peter MacKinnon - 2.1.0-6 +- Added missing Requires: httpd-mmn + +* Mon Sep 26 2011 Robert Rati - 2.1.0-5 +- Added patch to fix a free of a static buffer + * Tue Aug 16 2011 Robert Rati - 2.1.0-4 - Added generic stream patch - Created security package to separate rampart dependency