Fix wrong usage of libcurl API, which caused segfaults when wbemcli was used with https scheme

This commit is contained in:
Vitezslav Crhonek 2013-04-29 13:49:06 +02:00
parent c645c87fa9
commit 30b7a3a0ce
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,23 @@
@@ -, +, @@
---
main.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
--- a/main.cpp
+++ a/main.cpp
@@ -133,6 +133,7 @@ int main (int argc, char *argv[]) {
ClassesXml *ca=0;
MethodresponseXml *mrsp=0;
string sb;
+ {
#ifdef HAVE_LIBWWW
CimomWww cimom;
#elif HAVE_LIBCURL
@@ -643,6 +644,7 @@ fini:
delete cna;
delete ca;
delete mrsp;
+ }
#ifdef HAVE_LIBCURL
// These needs to be called once
curl_global_cleanup();
--

View File

@ -1,6 +1,6 @@
Name: sblim-wbemcli
Version: 1.6.2
Release: 6%{?dist}
Release: 7%{?dist}
Summary: SBLIM WBEM Command Line Interface
Group: Applications/System
@ -9,6 +9,7 @@ URL: http://sblim.wiki.sourceforge.net/
Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2
Patch0: sblim-wbemcli-1.5.1-gcc43.patch
Patch1: sblim-wbemcli-1.6.2-gcc47.patch
Patch2: sblim-wbemcli-1.6.2-https-segfaults.patch
BuildRequires: curl-devel >= 7.9.3
BuildRequires: binutils-devel >= 2.17.50.0.3-4
@ -23,6 +24,7 @@ scripts.
%setup -q
%patch0 -p1 -b .gcc43
%patch1 -p1 -b .gcc47
%patch2 -p1 -b .https-segfaults
%build
%configure CACERT=/etc/Pegasus/client.pem
@ -38,6 +40,10 @@ mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name}
%{_datadir}/%{name}
%changelog
* Mon Apr 29 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.2-7
- Fix wrong usage of libcurl API, which caused segfaults when wbemcli was used
with https scheme (patch by kdudka@redhat.com)
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild