fixed error handling when transfering too large files (#741980)

This commit is contained in:
Enrico Scholz 2011-10-03 20:54:24 +02:00
parent bf23117dc3
commit 066519debf
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From 9b65c6488a51d36513b9315c11dfb42f319079ac Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Mon, 3 Oct 2011 20:49:57 +0200
Subject: [PATCH] xmlrpc_serialize: check for faults before appending
</struct>
fixes https://bugzilla.redhat.com/show_bug.cgi?id=741980 which was
caused by transmitting too large files within a structure.
---
src/xmlrpc_serialize.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/xmlrpc_serialize.c b/src/xmlrpc_serialize.c
index 78bbc10..e0d9376 100644
--- a/src/xmlrpc_serialize.c
+++ b/src/xmlrpc_serialize.c
@@ -370,7 +370,8 @@ serializeStruct(xmlrpc_env * const envP,
memberKeyP, memberValueP, dialect);
}
}
- addString(envP, outputP, "</struct>");
+ if (!envP->fault_occurred)
+ addString(envP, outputP, "</struct>");
}
}
}
--
1.7.6

View File

@ -6,7 +6,7 @@
Summary: A lightweight RPC library based on XML and HTTP
Name: xmlrpc-c
Version: 1.27.5
Release: %release_func 1700.svn%svnrev
Release: %release_func 1701.svn%svnrev
# See COPYING for details.
# The Python 1.5.2 license used by a few files is just BSD.
License: BSD and MIT
@ -28,6 +28,7 @@ Patch107: xmlrpc-c-uninit-curl.patch
Patch108: xmlrpc-c-30x-redirect.patch
Patch109: xmlrpc-c-check-vasprintf-return-value.patch
Patch110: xmlrpc-c-include-string_int.h.patch
Patch111: xmlrpc-c-struct-serialize.patch
BuildRoot: %_tmppath/%name-%version-%release-root
@ -117,6 +118,7 @@ This package contains some handy XML-RPC demo applications.
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
## not needed...
rm doc/{INSTALL,configure_doc}
@ -235,6 +237,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Oct 3 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.27.5-1701.svn2185
- fixed error handling when transfering too large files (#741980)
* Sat Aug 27 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 1.27.5-1700.svn2185
- updated to 1.27.5