Compare commits

...
Sign in to create a new pull request.

7 commits

Author SHA1 Message Date
Enrico Scholz
65c032d553 forward ported two patches from stable branch
- fixes interruption with libcurl transport
- fixes parsing error of 64 bit integers
- fixes libxml2 related memory leak
2012-12-09 13:28:15 +01:00
Enrico Scholz
1e3326957b forward-ported patch from stable branch which fixes exception handling
on invalid utf-8 strings
2012-08-26 16:48:38 +02:00
Enrico Scholz
6b42c410d9 backported "Fix double free of memory with failed xmlrpc_parse_value()" patch 2012-06-06 21:20:48 +02:00
Enrico Scholz
3a12921677 bumped/fixed release numbers 2012-05-26 12:37:54 +02:00
Enrico Scholz
15bf2f3ed2 backported IPv6 server related patch 2012-05-26 12:27:30 +02:00
Enrico Scholz
c5acb0e5fe backported fix for uninitialized, authentication related variable (#819558, analyzed by Rob Crittenden) 2012-05-11 21:57:14 +02:00
Enrico Scholz
4a3c76e8e9 updated to 1.29.3 2012-04-05 12:22:51 +02:00
11 changed files with 366 additions and 11 deletions

2
.gitignore vendored
View file

@ -1 +1 @@
/xmlrpc-c-1.29.0.tar.xz
/xmlrpc-c-1.29.3.tar.xz

40
curl-uninit-auth.patch Normal file
View file

@ -0,0 +1,40 @@
commit 67423a6ac47158d01a152222725c1fef63c5c49c
Author: giraffedata <giraffedata@adbb7d4b-a73a-0410-a071-c5f57c452bd4>
Date: Fri May 11 15:41:03 2012 +0000
Fix unset variable
git-svn-id: https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/trunk@2319 adbb7d4b-a73a-0410-a071-c5f57c452bd4
diff --git a/lib/curl_transport/curltransaction.c b/lib/curl_transport/curltransaction.c
index 6fe7903..fce691e 100644
--- a/lib/curl_transport/curltransaction.c
+++ b/lib/curl_transport/curltransaction.c
@@ -376,10 +376,9 @@ setupAuth(xmlrpc_env * const envP ATTR_UNUSED,
HTTP basic authentication.
So the special function is this: if libcurl is too old to have
- authorization options and *serverInfoP allows basic authentication,
- return as *basicAuthHdrParamP an appropriate parameter for the
- Authorization: Basic: HTTP header. Otherwise, return
- *basicAuthHdrParamP == NULL.
+ authorization options and *serverInfoP allows basic authentication, return
+ as *authHdrValueP an appropriate parameter for the Authorization: Basic:
+ HTTP header. Otherwise, return *authHdrValueP == NULL.
-----------------------------------------------------------------------------*/
CURLcode rc;
@@ -415,10 +414,12 @@ setupAuth(xmlrpc_env * const envP ATTR_UNUSED,
"authentication header");
} else
*authHdrValueP = NULL;
- }
+ } else
+ *authHdrValueP = NULL;
}
+
static void
setCurlTimeout(CURL * const curlSessionP ATTR_UNUSED,
unsigned int const timeout ATTR_UNUSED) {

105
fix-double-free.patch Normal file
View file

@ -0,0 +1,105 @@
commit dc129ae656085855cf126e81183001a5c50fdd77
Author: giraffedata <giraffedata@adbb7d4b-a73a-0410-a071-c5f57c452bd4>
Date: Sat May 26 21:00:19 2012 +0000
Fix double free of memory with failed xmlrpc_parse_value()
git-svn-id: https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/trunk@2327 adbb7d4b-a73a-0410-a071-c5f57c452bd4
diff --git a/src/xmlrpc_decompose.c b/src/xmlrpc_decompose.c
index 6323a26..4a77426 100644
--- a/src/xmlrpc_decompose.c
+++ b/src/xmlrpc_decompose.c
@@ -165,37 +165,33 @@ struct decompTreeNode {
/* prototype for recursive calls */
static void
-releaseDecomposition(const struct decompTreeNode * const decompRootP,
- bool const oldstyleMemMgmt);
+releaseDecomposition(const struct decompTreeNode * const decompRootP);
static void
-releaseDecompArray(struct arrayDecomp const arrayDecomp,
- bool const oldstyleMemMgmt) {
+releaseDecompArray(struct arrayDecomp const arrayDecomp) {
unsigned int i;
for (i = 0; i < arrayDecomp.itemCnt; ++i) {
- releaseDecomposition(arrayDecomp.itemArray[i], oldstyleMemMgmt);
+ releaseDecomposition(arrayDecomp.itemArray[i]);
}
}
+
static void
-releaseDecompStruct(struct structDecomp const structDecomp,
- bool const oldstyleMemMgmt) {
+releaseDecompStruct(struct structDecomp const structDecomp) {
unsigned int i;
for (i = 0; i < structDecomp.mbrCnt; ++i) {
- releaseDecomposition(structDecomp.mbrArray[i].decompTreeP,
- oldstyleMemMgmt);
+ releaseDecomposition(structDecomp.mbrArray[i].decompTreeP);
}
}
static void
-releaseDecomposition(const struct decompTreeNode * const decompRootP,
- bool const oldstyleMemMgmt) {
+releaseDecomposition(const struct decompTreeNode * const decompRootP) {
/*----------------------------------------------------------------------------
Assuming that Caller has decomposed something according to 'decompRootP',
release whatever resources the decomposed information occupies.
@@ -236,10 +232,10 @@ releaseDecomposition(const struct decompTreeNode * const decompRootP,
xmlrpc_DECREF(*decompRootP->store.TstructVal.valueP);
break;
case '(':
- releaseDecompArray(decompRootP->store.Tarray, oldstyleMemMgmt);
+ releaseDecompArray(decompRootP->store.Tarray);
break;
case '{':
- releaseDecompStruct(decompRootP->store.Tstruct, oldstyleMemMgmt);
+ releaseDecompStruct(decompRootP->store.Tstruct);
break;
}
}
@@ -310,11 +306,12 @@ parsearray(xmlrpc_env * const envP,
}
}
if (envP->fault_occurred) {
- /* Release the items we completed before we failed. */
- unsigned int i;
- for (i = 0; i < doneCnt; ++i)
- releaseDecomposition(arrayDecomp.itemArray[i],
- oldstyleMemMgmt);
+ if (!oldstyleMemMgmt) {
+ /* Release the items we completed before we failed. */
+ unsigned int i;
+ for (i = 0; i < doneCnt; ++i)
+ releaseDecomposition(arrayDecomp.itemArray[i]);
+ }
}
}
}
@@ -351,10 +348,12 @@ parsestruct(xmlrpc_env * const envP,
}
if (envP->fault_occurred) {
- unsigned int i;
- for (i = 0; i < doneCount; ++i)
- releaseDecomposition(structDecomp.mbrArray[i].decompTreeP,
- oldstyleMemMgmt);
+ if (!oldstyleMemMgmt) {
+ /* Release the items we completed before we failed. */
+ unsigned int i;
+ for (i = 0; i < doneCount; ++i)
+ releaseDecomposition(structDecomp.mbrArray[i].decompTreeP);
+ }
}
}

View file

@ -0,0 +1,23 @@
commit e843bfc560ec7baabf9f88421ecdd1826e9fb578
Author: giraffedata <giraffedata@adbb7d4b-a73a-0410-a071-c5f57c452bd4>
Date: Wed Aug 22 03:18:22 2012 +0000
Release 1.25.19
git-svn-id: https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable@2385 adbb7d4b-a73a-0410-a071-c5f57c452bd4
diff --git a/src/xmlrpc_string.c b/src/xmlrpc_string.c
index ac9a1f5..9496bfa 100644
--- a/src/xmlrpc_string.c
+++ b/src/xmlrpc_string.c
@@ -673,6 +673,10 @@ stringNew(xmlrpc_env * const envP,
xmlrpc_value * valP;
+ // hack to work around old-style exception cleanup in
+ // convert_params() in xmlrpc_parse.c.
+ valP = NULL;
+
xmlrpc_validate_utf8(envP, value, length);
if (!envP->fault_occurred) {

22
ipv6-parse.patch Normal file
View file

@ -0,0 +1,22 @@
commit 2b92ed9855f4decbab5ba46d0cbf491f3fd6044b
Author: giraffedata <giraffedata@adbb7d4b-a73a-0410-a071-c5f57c452bd4>
Date: Sat May 19 02:06:59 2012 +0000
Fix parsing of host/port with colons in host portion
[backported]
git-svn-id: https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/trunk@2323 adbb7d4b-a73a-0410-a071-c5f57c452bd4
diff --git a/lib/abyss/src/http.c b/lib/abyss/src/http.c
index 096d93e..6b03e4c 100644
--- a/lib/abyss/src/http.c
+++ b/lib/abyss/src/http.c
@@ -527,7 +527,7 @@ parseHostPort(const char * const hostport,
buffer = strdup(hostport);
- colonPos = strchr(buffer, ':');
+ colonPos = strrchr(buffer, ':');
if (colonPos) {
const char * p;
uint32_t port;

View file

@ -1 +1 @@
2233
2298

69
release-1.25.20.patch Normal file
View file

@ -0,0 +1,69 @@
From 1c76aa8abeaef8273f637324e43de78677535833 Mon Sep 17 00:00:00 2001
From: giraffedata <giraffedata@adbb7d4b-a73a-0410-a071-c5f57c452bd4>
Date: Fri, 19 Oct 2012 19:47:27 +0000
Subject: Release 1.25.20
git-svn-id: https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable@2435 adbb7d4b-a73a-0410-a071-c5f57c452bd4
---
lib/curl_transport/xmlrpc_curl_transport.c | 23 ++++++++++++++++++++---
version.mk | 2 +-
2 Dateien geändert, 21 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-)
diff --git a/lib/curl_transport/xmlrpc_curl_transport.c b/lib/curl_transport/xmlrpc_curl_transport.c
index c48b927..96a403e 100644
--- a/lib/curl_transport/xmlrpc_curl_transport.c
+++ b/lib/curl_transport/xmlrpc_curl_transport.c
@@ -1170,6 +1170,16 @@ createRpc(xmlrpc_env * const envP,
if (rpcP == NULL)
xmlrpc_faultf(envP, "Couldn't allocate memory for rpc object");
else {
+ curlt_progressFn * curlProgressFn;
+
+ if (progress || clientTransportP->interruptP)
+ curlProgressFn = &curlTransactionProgress;
+ else {
+ /* There's nothing for curlTransactionProgress() to do, so save
+ the time and complexity of calling it.
+ */
+ curlProgressFn = NULL;
+ }
rpcP->transportP = clientTransportP;
rpcP->curlSessionP = curlSessionP;
rpcP->callInfoP = callInfoP;
@@ -1186,7 +1196,7 @@ createRpc(xmlrpc_env * const envP,
&clientTransportP->curlSetupStuff,
rpcP,
complete ? &finishRpcCurlTransaction : NULL,
- progress ? &curlTransactionProgress : NULL,
+ curlProgressFn,
&rpcP->curlTransactionP);
if (!envP->fault_occurred) {
if (envP->fault_occurred)
@@ -1296,15 +1306,22 @@ curlTransactionProgress(void * const context,
assert(rpcP);
assert(transportP);
- assert(rpcP->progress);
progressData.response.total = dlTotal;
progressData.response.now = dlNow;
progressData.call.total = ulTotal;
progressData.call.now = ulNow;
- rpcP->progress(rpcP->callInfoP, progressData);
+ if (rpcP->progress) {
+ struct xmlrpc_progress_data progressData;
+
+ progressData.response.total = dlTotal;
+ progressData.response.now = dlNow;
+ progressData.call.total = ulTotal;
+ progressData.call.now = ulNow;
+ rpcP->progress(rpcP->callInfoP, progressData);
+ }
if (transportP->interruptP)
*abortP = *transportP->interruptP;
else
--
1.7.11.7

59
release-1.25.21.patch Normal file
View file

@ -0,0 +1,59 @@
From c880196664ca3902cbf8fd806a58a9e9f362abb0 Mon Sep 17 00:00:00 2001
From: giraffedata <giraffedata@adbb7d4b-a73a-0410-a071-c5f57c452bd4>
Date: Thu, 29 Nov 2012 04:37:55 +0000
Subject: Release 1.25.21
git-svn-id: https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable@2452 adbb7d4b-a73a-0410-a071-c5f57c452bd4
---
lib/abyss/src/channel.c | 2 +-
src/method.c | 1 +
src/xmlrpc_libxml2.c | 6 ++++--
version.mk | 2 +-
4 Dateien geändert, 7 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-)
diff --git a/lib/abyss/src/channel.c b/lib/abyss/src/channel.c
index 5044e23..5454bd0 100644
--- a/lib/abyss/src/channel.c
+++ b/lib/abyss/src/channel.c
@@ -181,7 +181,7 @@ void
ChannelInterrupt(TChannel * const channelP) {
if (ChannelTraceIsActive)
- fprintf(stderr, "Interrupting channel waits");
+ fprintf(stderr, "Interrupting channel waits\n");
(*channelP->vtbl.interrupt)(channelP);
}
diff --git a/src/method.c b/src/method.c
index 467bbbe..e375e5f 100644
--- a/src/method.c
+++ b/src/method.c
@@ -54,6 +54,7 @@ translateTypeSpecifierToName(xmlrpc_env * const envP,
case 'S': *typeNameP = "struct"; break;
case 'A': *typeNameP = "array"; break;
case 'n': *typeNameP = "nil"; break;
+ case 'I': *typeNameP = "i8"; break;
default:
xmlrpc_faultf(envP,
"Method registry contains invalid signature "
diff --git a/src/xmlrpc_libxml2.c b/src/xmlrpc_libxml2.c
index 3df6231..574af86 100644
--- a/src/xmlrpc_libxml2.c
+++ b/src/xmlrpc_libxml2.c
@@ -422,9 +422,11 @@ xml_parse(xmlrpc_env * const envP,
*resultPP = context.root;
cleanup:
- if (parser)
+ if (parser) {
+ if (parser->myDoc)
+ xmlFreeDoc(parser->myDoc);
xmlFreeParserCtxt(parser);
-
+ }
if (envP->fault_occurred) {
if (context.root)
xml_element_free(context.root);
--
1.7.11.7

View file

@ -1 +1 @@
43d36b8255c0aca641cc60d7796ca29f xmlrpc-c-1.29.0.tar.xz
e8696d57b6e3aa50dc51417bb4897930 xmlrpc-c-1.29.3.tar.xz

View file

@ -1,7 +1,7 @@
From 668427e2d8fff3e6b51b6bb3ca8339e47a472a04 Mon Sep 17 00:00:00 2001
From 74c3caff3a436cc81346544006af0b6608ccfc41 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 5 Apr 2008 10:55:02 +0200
Subject: [PATCH] make -> cmake transition
Subject: [PATCH 1/8] make -> cmake transition
cmake: updated
---
@ -125,7 +125,7 @@ cmake: updated
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..2d83ce2
index 0000000..0d64757
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,288 @@
@ -144,7 +144,7 @@ index 0000000..2d83ce2
+
+set(XMLRPC_C_VERSION_MAJOR "1" CACHE STRING "Version (major) of xmlrpc-c")
+set(XMLRPC_C_VERSION_MINOR "29" CACHE STRING "Version (minor) of xmlrpc-c")
+set(XMLRPC_C_VERSION_POINT "0" CACHE STRING "Version (point) of xmlrpc-c")
+set(XMLRPC_C_VERSION_POINT "3" CACHE STRING "Version (point) of xmlrpc-c")
+
+set(XMLRPC_C_VERSION
+ "${XMLRPC_C_VERSION_MAJOR}.${XMLRPC_C_VERSION_MINOR}.${XMLRPC_C_VERSION_POINT}"
@ -2028,5 +2028,5 @@ index 0000000..a1f56aa
+
+#endif
--
1.7.6
1.7.7.6

View file

@ -1,12 +1,12 @@
%global advanced_branch 1
%global svnrev 2233
%global svnrev 2290
%{!?release_func:%global release_func() %%{?prerelease:0.}%1%%{?prerelease:.%%prerelease}%%{?dist}}
Summary: A lightweight RPC library based on XML and HTTP
Name: xmlrpc-c
Version: 1.29.0
Release: %release_func 1701.svn%svnrev
Version: 1.29.3
Release: %release_func 1707.svn%svnrev
# See COPYING for details.
# The Python 1.5.2 license used by a few files is just BSD.
License: BSD and MIT
@ -21,6 +21,13 @@ URL: http://xmlrpc-c.sourceforge.net/
Source100: dfs.cc
Source101: dso-fixup
Patch1: curl-uninit-auth.patch
Patch2: ipv6-parse.patch
Patch3: fix-double-free.patch
Patch4: fix-string-exceptions.patch
Patch5: release-1.25.20.patch
Patch6: release-1.25.21.patch
Patch100: xmlrpc-c-cmake.patch
Patch102: xmlrpc-c-printf-size_t.patch
Patch105: xmlrpc-c-longlong.patch
@ -110,6 +117,12 @@ This package contains some handy XML-RPC demo applications.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch100 -p1
%patch102 -p1
%patch105 -p1
@ -235,6 +248,30 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Sun Dec 9 2012 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.29.3-1707.svn2290
- forward ported two patches from stable branch
- fixes interruption with libcurl transport
- fixes parsing error of 64 bit integers
- fixes libxml2 related memory leak
* Sun Aug 26 2012 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.29.3-1706.svn2290
- forward-ported patch from stable branch which fixes exception
handling on invalid utf-8 strings
* Wed Jun 6 2012 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.29.3-1705.svn2290
- backported "Fix double free of memory with failed xmlrpc_parse_value()"
patch
* Sat May 26 2012 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.29.3-1704.svn2290
- backported IPv6 server related patch
* Fri May 11 2012 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.29.3-1703.svn2290
- backported fix for uninitialized, authentication related variable (#819558,
analyzed by Rob Crittenden)
* Thu Apr 5 2012 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.29.3-1702.svn2290
- updated to 1.29.3
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.29.0-1701.svn2233
- Rebuilt for c++ ABI breakage