From: XueBing Chen Date: Mon, 11 Jul 2022 14:05:33 +0000 (+0800) Subject: dmaengine: xilinx: use strscpy to replace strlcpy X-Git-Tag: v6.0-rc1~117^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f66d59180bae2f0e8979962c3df4d445b3ac50d0;p=thirdparty%2Flinux.git dmaengine: xilinx: use strscpy to replace strlcpy The strlcpy should not be used because it doesn't limit the source length. Preferred is strscpy. Signed-off-by: XueBing Chen Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/39aa840f.e31.181ed9461c2.Coremail.chenxuebing@jari.cn Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/xilinx/xilinx_dpdma.c b/drivers/dma/xilinx/xilinx_dpdma.c index f708808d73ba3..84dc5240a8074 100644 --- a/drivers/dma/xilinx/xilinx_dpdma.c +++ b/drivers/dma/xilinx/xilinx_dpdma.c @@ -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); }