Skip to content

Commit

Permalink
dmaengine: xilinx: use strscpy to replace strlcpy
Browse files Browse the repository at this point in the history
The strlcpy should not be used because it doesn't limit the source
length. Preferred is strscpy.

Signed-off-by: XueBing Chen <chenxuebing@jari.cn>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/39aa840f.e31.181ed9461c2.Coremail.chenxuebing@jari.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
XueBing Chen authored and vinodkoul committed Jul 21, 2022
1 parent e0c7ea8 commit f66d591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/xilinx/xilinx_dpdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ static ssize_t xilinx_dpdma_debugfs_read(struct file *f, char __user *buf,
if (ret < 0)
goto done;
} else {
strlcpy(kern_buff, "No testcase executed",
strscpy(kern_buff, "No testcase executed",
XILINX_DPDMA_DEBUGFS_READ_MAX_SIZE);
}

Expand Down

0 comments on commit f66d591

Please sign in to comment.