openbsd-ports/devel/cmake/patches/patch-Utilities_cmxmlrpc_xmlrpc_parse_c
espie 8063f8ee22 find qmake4, not qmake...
regen other patches with new diff.
2007-03-20 11:23:10 +00:00

26 lines
1.0 KiB
Plaintext

$OpenBSD: patch-Utilities_cmxmlrpc_xmlrpc_parse_c,v 1.2 2007/03/20 11:23:10 espie Exp $
--- Utilities/cmxmlrpc/xmlrpc_parse.c.orig Wed Jan 10 18:59:18 2007
+++ Utilities/cmxmlrpc/xmlrpc_parse.c Sun Mar 18 13:52:03 2007
@@ -579,6 +579,7 @@ xmlrpc_parse_call(xmlrpc_env * const envP,
size_t call_child_count;
char * outMethodName;
xmlrpc_value * outParamArrayP;
+ size_t sz;
XMLRPC_ASSERT_ENV_OK(envP);
XMLRPC_ASSERT(xml_data != NULL);
@@ -618,10 +619,11 @@ xmlrpc_parse_call(xmlrpc_env * const envP,
xmlrpc_validate_utf8(envP, cdata, strlen(cdata));
XMLRPC_FAIL_IF_FAULT(envP);
#endif /* HAVE_UNICODE_WCHAR */
- outMethodName = malloc(strlen(cdata) + 1);
+ sz = strlen(cdata) + 1;
+ outMethodName = malloc(sz);
XMLRPC_FAIL_IF_NULL(outMethodName, envP, XMLRPC_INTERNAL_ERROR,
"Could not allocate memory for method name");
- strcpy(outMethodName, cdata);
+ strlcpy(outMethodName, cdata, sz);
/* Convert our parameters. */
if (call_child_count == 1) {