* [PATCH] dmaengine: xilinx: use strscpy to replace strlcpy
@ 2022-07-11 14:05 XueBing Chen
2022-07-11 16:37 ` Laurent Pinchart
2022-07-21 13:34 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: XueBing Chen @ 2022-07-11 14:05 UTC (permalink / raw)
To: hyun.kwon, laurent.pinchart, vkoul, michal.simek
Cc: dmaengine, linux-arm-kernel, linux-kernel
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>
---
drivers/dma/xilinx/xilinx_dpdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/xilinx/xilinx_dpdma.c b/drivers/dma/xilinx/xilinx_dpdma.c
index b0f4948b00a5..f5815465e83b 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);
}
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: xilinx: use strscpy to replace strlcpy
2022-07-11 14:05 [PATCH] dmaengine: xilinx: use strscpy to replace strlcpy XueBing Chen
@ 2022-07-11 16:37 ` Laurent Pinchart
2022-07-21 13:34 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2022-07-11 16:37 UTC (permalink / raw)
To: XueBing Chen
Cc: hyun.kwon, vkoul, michal.simek, dmaengine, linux-arm-kernel,
linux-kernel
Hi XueBing,
Thank you for the patch.
On Mon, Jul 11, 2022 at 10:05:33PM +0800, XueBing Chen wrote:
>
> 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>
> ---
> drivers/dma/xilinx/xilinx_dpdma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/xilinx/xilinx_dpdma.c b/drivers/dma/xilinx/xilinx_dpdma.c
> index b0f4948b00a5..f5815465e83b 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);
> }
>
--
Regards,
Laurent Pinchart
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: xilinx: use strscpy to replace strlcpy
2022-07-11 14:05 [PATCH] dmaengine: xilinx: use strscpy to replace strlcpy XueBing Chen
2022-07-11 16:37 ` Laurent Pinchart
@ 2022-07-21 13:34 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2022-07-21 13:34 UTC (permalink / raw)
To: XueBing Chen
Cc: hyun.kwon, laurent.pinchart, michal.simek, dmaengine,
linux-arm-kernel, linux-kernel
On 11-07-22, 22:05, XueBing Chen wrote:
>
> The strlcpy should not be used because it doesn't limit the source
> length. Preferred is strscpy.
Applied, thanks
--
~Vinod
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-21 13:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-11 14:05 [PATCH] dmaengine: xilinx: use strscpy to replace strlcpy XueBing Chen
2022-07-11 16:37 ` Laurent Pinchart
2022-07-21 13:34 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox