[wso2-wsf-cpp/f15] Fix BZ738719
rrati
rrati at fedoraproject.org
Mon Oct 3 18:14:31 UTC 2011
commit 52250f37dbde68327e034d75b3ce428488bb472f
Author: Robert Rati <rrati at redhat.com>
Date: Mon Oct 3 13:13:45 2011 -0500
Fix BZ738719
prevent_free_of_static_chars.patch | 46 ++++++++++++++++++++++++++++++++++++
wso2-wsf-cpp.spec | 9 ++++++-
2 files changed, 54 insertions(+), 1 deletions(-)
---
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 <pmackinn at redhat.com>
+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..c70249e 100644
--- a/wso2-wsf-cpp.spec
+++ b/wso2-wsf-cpp.spec
@@ -24,7 +24,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 +49,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
@@ -470,6 +473,7 @@ chmod a-x wsf_c/wsclient/LICENSE
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%build
%if %{build_sandesha2}
@@ -614,6 +618,9 @@ mv -f %{buildroot}/%{_includedir}/*.h %{buildroot}/%{_includedir}/%{pkg_name}
rm -rf %{buildroot}
%changelog
+* Mon Sep 26 2011 Robert Rati <rrati at redhat> - 2.1.0-5
+- Added patch to fix a free of a static buffer
+
* Tue Aug 16 2011 Robert Rati <rrati at redhat> - 2.1.0-4
- Added generic stream patch
- Created security package to separate rampart dependency
More information about the scm-commits
mailing list