mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 11:23:07 +08:00
change strcpy to strlcpy
Change-Id: I8b9429a3c225a82842fce136bdb14b8b135066d3 Signed-off-by: lilei19 <lilei19@xiaomi.com>
This commit is contained in:
@@ -323,7 +323,7 @@ int pppd(const struct pppd_settings_s *pppd_settings)
|
||||
|
||||
ctx = (struct ppp_context_s *)malloc(sizeof(struct ppp_context_s));
|
||||
memset(ctx, 0, sizeof(struct ppp_context_s));
|
||||
strcpy((char *)ctx->ifname, "ppp%d");
|
||||
strlcpy((char *)ctx->ifname, "ppp%d", sizeof(ctx->ifname));
|
||||
|
||||
ctx->settings = pppd_settings;
|
||||
ctx->if_fd = tun_alloc((char *)ctx->ifname);
|
||||
|
Reference in New Issue
Block a user