]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dmaengine: xilinx: use strscpy to replace strlcpy
authorXueBing Chen <chenxuebing@jari.cn>
Mon, 11 Jul 2022 14:05:33 +0000 (22:05 +0800)
committerVinod Koul <vkoul@kernel.org>
Thu, 21 Jul 2022 13:34:35 +0000 (19:04 +0530)
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>
drivers/dma/xilinx/xilinx_dpdma.c

index f708808d73ba32fbf86ef3f973084ebc9e10764d..84dc5240a8074ad3f184df62696ed8c902b58a9e 100644 (file)
@@ -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);
        }