提交 19136bbf 编写于 作者: A Andrea Bolognani

esx: Use memcpy() in esxVI_CURL_Debug()

We're going to change virStrncpy() in a way that
requires the source string to be NULL-terminated, so
we'll no longer be able to use in this context.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
上级 6c0d0210
......@@ -185,10 +185,8 @@ esxVI_CURL_Debug(CURL *curl ATTRIBUTE_UNUSED, curl_infotype type,
if (VIR_ALLOC_N(buffer, size + 1) < 0)
return 0;
if (virStrncpy(buffer, info, size, size + 1) < 0) {
VIR_FREE(buffer);
return 0;
}
memcpy(buffer, info, size);
buffer[size] = '\0';
switch (type) {
case CURLINFO_TEXT:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册