linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] treewide: correct misuses of strscpy/strlcpy
@ 2019-07-04 23:57 Joe Perches
  2019-07-04 23:57 ` [PATCH 1/8] Input: synaptics: Fix misuse of strlcpy Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2019-07-04 23:57 UTC (permalink / raw)
  To: Dan Murphy, linux-leds, linux-media, linux-arm-kernel,
	linuxppc-dev, linux-nfs
  Cc: linux-input, linux-kernel, netdev

These are all likely copy/paste defects where the field size of the
'copied to' array is incorrect.

Each patch in this series is independent.

Joe Perches (8):
  Input: synaptics: Fix misuse of strlcpy
  leds: as3645a: Fix misuse of strlcpy
  media: m2m-deinterlace: Fix misuse of strscpy
  media: go7007: Fix misuse of strscpy
  net: ethernet: sun4i-emac: Fix misuse of strlcpy
  net: nixge: Fix misuse of strlcpy
  tty: hvcs: Fix odd use of strlcpy
  nfsd: Fix misuse of strlcpy

 drivers/input/mouse/synaptics.c             | 2 +-
 drivers/leds/leds-as3645a.c                 | 2 +-
 drivers/media/platform/m2m-deinterlace.c    | 2 +-
 drivers/media/usb/go7007/snd-go7007.c       | 2 +-
 drivers/net/ethernet/allwinner/sun4i-emac.c | 4 ++--
 drivers/net/ethernet/ni/nixge.c             | 2 +-
 drivers/tty/hvc/hvcs.c                      | 4 ++--
 fs/nfsd/nfs4idmap.c                         | 2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

-- 
2.15.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/8] Input: synaptics: Fix misuse of strlcpy
  2019-07-04 23:57 [PATCH 0/8] treewide: correct misuses of strscpy/strlcpy Joe Perches
@ 2019-07-04 23:57 ` Joe Perches
  2019-07-14 18:29   ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2019-07-04 23:57 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dmitry Torokhov, linux-input

Probable cut&paste typo - use the correct field size.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/input/mouse/synaptics.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 1080c0c49815..00a0cf14f27f 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -705,7 +705,7 @@ static void synaptics_pt_create(struct psmouse *psmouse)
 
 	serio->id.type = SERIO_PS_PSTHRU;
 	strlcpy(serio->name, "Synaptics pass-through", sizeof(serio->name));
-	strlcpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->name));
+	strlcpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->phys));
 	serio->write = synaptics_pt_write;
 	serio->start = synaptics_pt_start;
 	serio->stop = synaptics_pt_stop;
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/8] Input: synaptics: Fix misuse of strlcpy
  2019-07-04 23:57 ` [PATCH 1/8] Input: synaptics: Fix misuse of strlcpy Joe Perches
@ 2019-07-14 18:29   ` Dmitry Torokhov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2019-07-14 18:29 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel, linux-input

On Thu, Jul 04, 2019 at 04:57:41PM -0700, Joe Perches wrote:
> Probable cut&paste typo - use the correct field size.

Applied, thank you.

Luckily both sizes (name and phys) are the same, so we need not to have
this in any of the stables.

> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/input/mouse/synaptics.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index 1080c0c49815..00a0cf14f27f 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -705,7 +705,7 @@ static void synaptics_pt_create(struct psmouse *psmouse)
>  
>  	serio->id.type = SERIO_PS_PSTHRU;
>  	strlcpy(serio->name, "Synaptics pass-through", sizeof(serio->name));
> -	strlcpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->name));
> +	strlcpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->phys));
>  	serio->write = synaptics_pt_write;
>  	serio->start = synaptics_pt_start;
>  	serio->stop = synaptics_pt_stop;
> -- 
> 2.15.0
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-14 18:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-04 23:57 [PATCH 0/8] treewide: correct misuses of strscpy/strlcpy Joe Perches
2019-07-04 23:57 ` [PATCH 1/8] Input: synaptics: Fix misuse of strlcpy Joe Perches
2019-07-14 18:29   ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).