mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-17 07:12:06 +08:00
change strcpy to strlcpy
Change-Id: I8b9429a3c225a82842fce136bdb14b8b135066d3 Signed-off-by: lilei19 <lilei19@xiaomi.com>
This commit is contained in:
@@ -236,7 +236,8 @@ static int xmlrpc_parseparam(struct parsebuf_s *pbuf)
|
||||
break;
|
||||
|
||||
case 's':
|
||||
strcpy(g_xmlcall.arguments[g_xmlcall.argsize].u.string, g_data);
|
||||
strlcpy(g_xmlcall.arguments[g_xmlcall.argsize].u.string, g_data,
|
||||
sizeof(g_xmlcall.arguments[g_xmlcall.argsize].u.string));
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -324,7 +325,7 @@ static int xmlrpc_parsemethod(struct parsebuf_s *pbuf)
|
||||
{
|
||||
/* Save the method name */
|
||||
|
||||
strcpy(g_xmlcall.name, g_data);
|
||||
strlcpy(g_xmlcall.name, g_data, sizeof(g_xmlcall.name));
|
||||
|
||||
/* Find the closing /methodCall */
|
||||
|
||||
|
Reference in New Issue
Block a user