FS-2746 --resolve large xmlrpc update thanks garmt

This commit is contained in:
Jeff Lenk committed 2012-10-13 11:37:25 -05:00
1 parent 37ecad9903
commit 6b6c83a718
397 files changed
+41821 -33840

No files matched your search

+11 -23
View File
@@ -100,11 +100,11 @@ accessStringValue(xmlrpc_env * const envP,
validateStringType(envP, valueP);
if (!envP->fault_occurred) {
unsigned int const size =
size_t const size =
XMLRPC_MEMBLOCK_SIZE(char, &valueP->_block);
const char * const contents =
XMLRPC_MEMBLOCK_CONTENTS(char, &valueP->_block);
unsigned int const len = size - 1;
size_t const len = size - 1;
/* The memblock has a null character added to the end */
verifyNoNulls(envP, contents, len);
@@ -141,7 +141,7 @@ xmlrpc_read_string(xmlrpc_env * const envP,
MALLOCARRAY(stringValue, length + 1);
if (stringValue == NULL)
xmlrpc_faultf(envP, "Unable to allocate space "
"for %u-character string", length);
"for %u-character string", (unsigned)length);
else {
memcpy(stringValue, contents, length);
stringValue[length] = '\0';
@@ -189,7 +189,7 @@ copyAndConvertLfToCrlf(xmlrpc_env * const envP,
MALLOCARRAY(dst, dstLen + 1);
if (dst == NULL)
xmlrpc_faultf(envP, "Unable to allocate space "
"for %u-character string", dstLen + 1);
"for %u-character string", (unsigned)dstLen + 1);
else {
const char * p; /* source pointer */
char * q; /* destination pointer */
@@ -253,7 +253,7 @@ xmlrpc_read_string_lp(xmlrpc_env * const envP,
validateStringType(envP, valueP);
if (!envP->fault_occurred) {
unsigned int const size =
size_t const size =
XMLRPC_MEMBLOCK_SIZE(char, &valueP->_block);
const char * const contents =
XMLRPC_MEMBLOCK_CONTENTS(char, &valueP->_block);
@@ -263,7 +263,7 @@ xmlrpc_read_string_lp(xmlrpc_env * const envP,
stringValue = malloc(size);
if (stringValue == NULL)
xmlrpc_faultf(envP, "Unable to allocate %u bytes for string.",
size);
(unsigned int)size);
else {
memcpy(stringValue, contents, size);
*stringValueP = stringValue;
@@ -282,7 +282,7 @@ xmlrpc_read_string_lp_crlf(xmlrpc_env * const envP,
validateStringType(envP, valueP);
if (!envP->fault_occurred) {
unsigned int const size =
size_t const size =
XMLRPC_MEMBLOCK_SIZE(char, &valueP->_block); /* Includes NUL */
const char * const contents =
XMLRPC_MEMBLOCK_CONTENTS(char, &valueP->_block);
@@ -371,7 +371,7 @@ xmlrpc_read_string_w(xmlrpc_env * const envP,
MALLOCARRAY(stringValue, length + 1);
if (stringValue == NULL)
xmlrpc_faultf(envP, "Unable to allocate space for %u-byte string",
length);
(unsigned)length);
else {
memcpy(stringValue, wcontents, length * sizeof(wchar_t));
stringValue[length] = '\0';
@@ -422,7 +422,7 @@ wCopyAndConvertLfToCrlf(xmlrpc_env * const envP,
MALLOCARRAY(dst, dstLen + 1);
if (dst == NULL)
xmlrpc_faultf(envP, "Unable to allocate space "
"for %u-character string", dstLen + 1);
"for %u-character string", (unsigned)dstLen + 1);
else {
const wchar_t * p; /* source pointer */
wchar_t * q; /* destination pointer */
@@ -560,18 +560,6 @@ xmlrpc_read_string_w_lp_old(xmlrpc_env * const envP,
static void
validateUtf(xmlrpc_env * const envP,
const char * const value,
size_t const length) {
#if HAVE_UNICODE_WCHAR
xmlrpc_validate_utf8(envP, value, length);
#endif
}
static void
copyLines(xmlrpc_env * const envP,
const char * const src,
@@ -685,7 +673,7 @@ stringNew(xmlrpc_env * const envP,
xmlrpc_value * valP;
validateUtf(envP, value, length);
xmlrpc_validate_utf8(envP, value, length);
if (!envP->fault_occurred) {
xmlrpc_createXmlrpcValue(envP, &valP);
@@ -762,7 +750,7 @@ xmlrpc_string_new_va(xmlrpc_env * const envP,
xmlrpc_vasprintf(&formattedString, format, args);
if (formattedString == xmlrpc_strsol) {
if (xmlrpc_strnomem(formattedString)) {
xmlrpc_faultf(envP, "Out of memory building formatted string");
retvalP = NULL; /* defeat compiler warning */
} else