change strcpy to strlcpy

Change-Id: I8b9429a3c225a82842fce136bdb14b8b135066d3
Signed-off-by: lilei19 <lilei19@xiaomi.com>
This commit is contained in:
lilei19
2023-02-09 19:01:32 +08:00
committed by Xiang Xiao
parent e86745b9a2
commit 41f60bd669
33 changed files with 238 additions and 180 deletions

View File

@@ -177,12 +177,13 @@ int xmlrpc_buildresponse(struct xmlrpc_s *xmlcall, char *args, ...)
return -1;
}
strcpy(xmlcall->response, "HTTP/1.1 200 OK\n"
"Connection: close\n"
"Content-length: xyza\n"
"Content-Type: text/xml\n"
"Server: Lightweight XMLRPC\n\n"
"<?xml version=\"1.0\"?>\n" "<methodResponse>\n");
strlcpy(xmlcall->response, "HTTP/1.1 200 OK\n"
"Connection: close\n"
"Content-length: xyza\n"
"Content-Type: text/xml\n"
"Server: Lightweight XMLRPC\n\n"
"<?xml version=\"1.0\"?>\n" "<methodResponse>\n",
sizeof(xmlcall->response));
if (xmlcall->error)
{