xiaoxiang781216 commented on code in PR #8726:
URL: https://github.com/apache/nuttx/pull/8726#discussion_r1183335121
##########
drivers/modem/alt1250/altcom_hdlr.c:
##########
@@ -2531,13 +2530,13 @@ static int32_t actpdn_pkt_compose(FAR void **arg,
out->iptype = apn->ip_type;
out->authtype = apn->auth_type;
- strncpy((FAR char *)out->apnname, (FAR const char *)apn->apn,
+ strlcpy((FAR char *)out->apnname, (FAR const char *)apn->apn,
sizeof(out->apnname));
if (apn->auth_type != LTE_APN_AUTHTYPE_NONE)
{
- strncpy((FAR char *)out->username, (FAR const char *)apn->user_name,
+ strlcpy((FAR char *)out->username, (FAR const char *)apn->user_name,
sizeof(out->username));
- strncpy((FAR char *)out->password, (FAR const char *)apn->password,
+ strlcpy((FAR char *)out->password, (FAR const char *)apn->password,
sizeof(out->password));
Review Comment:
Done.
##########
drivers/modem/alt1250/altcom_hdlr.c:
##########
@@ -2531,13 +2530,13 @@ static int32_t actpdn_pkt_compose(FAR void **arg,
out->iptype = apn->ip_type;
out->authtype = apn->auth_type;
- strncpy((FAR char *)out->apnname, (FAR const char *)apn->apn,
+ strlcpy((FAR char *)out->apnname, (FAR const char *)apn->apn,
sizeof(out->apnname));
if (apn->auth_type != LTE_APN_AUTHTYPE_NONE)
{
- strncpy((FAR char *)out->username, (FAR const char *)apn->user_name,
+ strlcpy((FAR char *)out->username, (FAR const char *)apn->user_name,
sizeof(out->username));
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]