mirror of
https://github.com/torvalds/linux.git
synced 2026-09-12 20:53:03 +02:00
rpmsg: glink: Replace strcpy() with strscpy()
Replace strcpy() with the safer strscpy() to address unsafe API usage warnings[1] from static analysis tools, as strcpy() performs no bounds checking on the destination buffer. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy Signed-off-by: Sudeepgoud Patil <quic_sudeepgo@quicinc.com> Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com> Reviewed-by: Chris Lew <christopher.lew@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251211-rpmsg-glink-strcpy-replace-v1-1-be06308e5724@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
parent
31a42429e0
commit
ad6d779538
|
|
@ -501,7 +501,7 @@ static int qcom_glink_send_open_req(struct qcom_glink *glink,
|
|||
req->cmd = cpu_to_le16(GLINK_CMD_OPEN);
|
||||
req->param1 = cpu_to_le16(channel->lcid);
|
||||
req->param2 = cpu_to_le32(name_len);
|
||||
strcpy(req->data, channel->name);
|
||||
strscpy(req->data, channel->name, GLINK_NAME_SIZE);
|
||||
|
||||
trace_qcom_glink_cmd_open_tx(glink->label, channel->name,
|
||||
channel->lcid, channel->rcid);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user