Fix BZ738719
This commit is contained in:
parent
81f71cbb13
commit
52250f37db
2 changed files with 54 additions and 1 deletions
46
prevent_free_of_static_chars.patch
Normal file
46
prevent_free_of_static_chars.patch
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
From 35055f4b07f06621f43a704285cb90b5d80dff9f Mon Sep 17 00:00:00 2001
|
||||
From: Peter MacKinnon <pmackinn@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
|
||||
|
||||
|
|
@ -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@redhat> - 2.1.0-5
|
||||
- Added patch to fix a free of a static buffer
|
||||
|
||||
* Tue Aug 16 2011 Robert Rati <rrati@redhat> - 2.1.0-4
|
||||
- Added generic stream patch
|
||||
- Created security package to separate rampart dependency
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue