linux-leds.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 ` Joe Perches
  2019-07-04 23:57 ` [PATCH 2/8] leds: as3645a: Fix misuse of strlcpy Joe Perches
  0 siblings, 2 replies; 9+ 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] 9+ messages in thread

* [PATCH 0/8] treewide: correct misuses of strscpy/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-04 23:57 ` [PATCH 2/8] leds: as3645a: Fix misuse of strlcpy Joe Perches
  1 sibling, 0 replies; 9+ 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] 9+ messages in thread

* [PATCH 2/8] leds: as3645a: 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-04 23:57 ` Joe Perches
  2019-07-04 23:57   ` Joe Perches
                     ` (3 more replies)
  1 sibling, 4 replies; 9+ messages in thread
From: Joe Perches @ 2019-07-04 23:57 UTC (permalink / raw)
  To: Sakari Ailus, Jacek Anaszewski, Pavel Machek, Dan Murphy
  Cc: linux-leds, linux-kernel

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

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

diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c
index 14ab6b0e4de9..050088dff8dd 100644
--- a/drivers/leds/leds-as3645a.c
+++ b/drivers/leds/leds-as3645a.c
@@ -668,7 +668,7 @@ static int as3645a_v4l2_setup(struct as3645a *flash)
 	};
 
 	strlcpy(cfg.dev_name, led->name, sizeof(cfg.dev_name));
-	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfg.dev_name));
+	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfgind.dev_name));
 
 	flash->vf = v4l2_flash_init(
 		&flash->client->dev, flash->flash_node, &flash->fled, NULL,
-- 
2.15.0

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

* [PATCH 2/8] leds: as3645a: Fix misuse of strlcpy
  2019-07-04 23:57 ` [PATCH 2/8] leds: as3645a: Fix misuse of strlcpy Joe Perches
@ 2019-07-04 23:57   ` Joe Perches
  2019-07-05  7:33   ` Sakari Ailus
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2019-07-04 23:57 UTC (permalink / raw)
  To: Sakari Ailus, Jacek Anaszewski, Pavel Machek, Dan Murphy
  Cc: linux-leds, linux-kernel

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

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

diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c
index 14ab6b0e4de9..050088dff8dd 100644
--- a/drivers/leds/leds-as3645a.c
+++ b/drivers/leds/leds-as3645a.c
@@ -668,7 +668,7 @@ static int as3645a_v4l2_setup(struct as3645a *flash)
 	};
 
 	strlcpy(cfg.dev_name, led->name, sizeof(cfg.dev_name));
-	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfg.dev_name));
+	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfgind.dev_name));
 
 	flash->vf = v4l2_flash_init(
 		&flash->client->dev, flash->flash_node, &flash->fled, NULL,
-- 
2.15.0


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

* Re: [PATCH 2/8] leds: as3645a: Fix misuse of strlcpy
  2019-07-04 23:57 ` [PATCH 2/8] leds: as3645a: Fix misuse of strlcpy Joe Perches
  2019-07-04 23:57   ` Joe Perches
@ 2019-07-05  7:33   ` Sakari Ailus
  2019-07-05  7:33     ` Sakari Ailus
  2019-07-05 20:23   ` Pavel Machek
  2019-07-15 18:29   ` Jacek Anaszewski
  3 siblings, 1 reply; 9+ messages in thread
From: Sakari Ailus @ 2019-07-05  7:33 UTC (permalink / raw)
  To: Joe Perches
  Cc: Jacek Anaszewski, Pavel Machek, Dan Murphy, linux-leds, linux-kernel

On Thu, Jul 04, 2019 at 04:57:42PM -0700, Joe Perches wrote:
> Probable cut&paste typo - use the correct field size.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Thanks, Joe!

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

> ---
>  drivers/leds/leds-as3645a.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c
> index 14ab6b0e4de9..050088dff8dd 100644
> --- a/drivers/leds/leds-as3645a.c
> +++ b/drivers/leds/leds-as3645a.c
> @@ -668,7 +668,7 @@ static int as3645a_v4l2_setup(struct as3645a *flash)
>  	};
>  
>  	strlcpy(cfg.dev_name, led->name, sizeof(cfg.dev_name));
> -	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfg.dev_name));
> +	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfgind.dev_name));
>  
>  	flash->vf = v4l2_flash_init(
>  		&flash->client->dev, flash->flash_node, &flash->fled, NULL,

-- 
Kind regards,

Sakari Ailus

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

* Re: [PATCH 2/8] leds: as3645a: Fix misuse of strlcpy
  2019-07-05  7:33   ` Sakari Ailus
@ 2019-07-05  7:33     ` Sakari Ailus
  0 siblings, 0 replies; 9+ messages in thread
From: Sakari Ailus @ 2019-07-05  7:33 UTC (permalink / raw)
  To: Joe Perches
  Cc: Jacek Anaszewski, Pavel Machek, Dan Murphy, linux-leds, linux-kernel

On Thu, Jul 04, 2019 at 04:57:42PM -0700, Joe Perches wrote:
> Probable cut&paste typo - use the correct field size.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Thanks, Joe!

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

> ---
>  drivers/leds/leds-as3645a.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c
> index 14ab6b0e4de9..050088dff8dd 100644
> --- a/drivers/leds/leds-as3645a.c
> +++ b/drivers/leds/leds-as3645a.c
> @@ -668,7 +668,7 @@ static int as3645a_v4l2_setup(struct as3645a *flash)
>  	};
>  
>  	strlcpy(cfg.dev_name, led->name, sizeof(cfg.dev_name));
> -	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfg.dev_name));
> +	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfgind.dev_name));
>  
>  	flash->vf = v4l2_flash_init(
>  		&flash->client->dev, flash->flash_node, &flash->fled, NULL,

-- 
Kind regards,

Sakari Ailus

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

* Re: [PATCH 2/8] leds: as3645a: Fix misuse of strlcpy
  2019-07-04 23:57 ` [PATCH 2/8] leds: as3645a: Fix misuse of strlcpy Joe Perches
  2019-07-04 23:57   ` Joe Perches
  2019-07-05  7:33   ` Sakari Ailus
@ 2019-07-05 20:23   ` Pavel Machek
  2019-07-05 20:23     ` Pavel Machek
  2019-07-15 18:29   ` Jacek Anaszewski
  3 siblings, 1 reply; 9+ messages in thread
From: Pavel Machek @ 2019-07-05 20:23 UTC (permalink / raw)
  To: Joe Perches
  Cc: Sakari Ailus, Jacek Anaszewski, Dan Murphy, linux-leds, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]

On Thu 2019-07-04 16:57:42, Joe Perches wrote:
> Probable cut&paste typo - use the correct field size.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Ack.
									Pavel
> ---
>  drivers/leds/leds-as3645a.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c
> index 14ab6b0e4de9..050088dff8dd 100644
> --- a/drivers/leds/leds-as3645a.c
> +++ b/drivers/leds/leds-as3645a.c
> @@ -668,7 +668,7 @@ static int as3645a_v4l2_setup(struct as3645a *flash)
>  	};
>  
>  	strlcpy(cfg.dev_name, led->name, sizeof(cfg.dev_name));
> -	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfg.dev_name));
> +	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfgind.dev_name));
>  
>  	flash->vf = v4l2_flash_init(
>  		&flash->client->dev, flash->flash_node, &flash->fled, NULL,

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH 2/8] leds: as3645a: Fix misuse of strlcpy
  2019-07-05 20:23   ` Pavel Machek
@ 2019-07-05 20:23     ` Pavel Machek
  0 siblings, 0 replies; 9+ messages in thread
From: Pavel Machek @ 2019-07-05 20:23 UTC (permalink / raw)
  To: Joe Perches
  Cc: Sakari Ailus, Jacek Anaszewski, Dan Murphy, linux-leds, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]

On Thu 2019-07-04 16:57:42, Joe Perches wrote:
> Probable cut&paste typo - use the correct field size.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Ack.
									Pavel
> ---
>  drivers/leds/leds-as3645a.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c
> index 14ab6b0e4de9..050088dff8dd 100644
> --- a/drivers/leds/leds-as3645a.c
> +++ b/drivers/leds/leds-as3645a.c
> @@ -668,7 +668,7 @@ static int as3645a_v4l2_setup(struct as3645a *flash)
>  	};
>  
>  	strlcpy(cfg.dev_name, led->name, sizeof(cfg.dev_name));
> -	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfg.dev_name));
> +	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfgind.dev_name));
>  
>  	flash->vf = v4l2_flash_init(
>  		&flash->client->dev, flash->flash_node, &flash->fled, NULL,

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH 2/8] leds: as3645a: Fix misuse of strlcpy
  2019-07-04 23:57 ` [PATCH 2/8] leds: as3645a: Fix misuse of strlcpy Joe Perches
                     ` (2 preceding siblings ...)
  2019-07-05 20:23   ` Pavel Machek
@ 2019-07-15 18:29   ` Jacek Anaszewski
  3 siblings, 0 replies; 9+ messages in thread
From: Jacek Anaszewski @ 2019-07-15 18:29 UTC (permalink / raw)
  To: Joe Perches, Sakari Ailus, Pavel Machek, Dan Murphy
  Cc: linux-leds, linux-kernel

Hi Joe,

Thank you for the patch.

On 7/5/19 1:57 AM, Joe Perches wrote:
> Probable cut&paste typo - use the correct field size.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/leds/leds-as3645a.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c
> index 14ab6b0e4de9..050088dff8dd 100644
> --- a/drivers/leds/leds-as3645a.c
> +++ b/drivers/leds/leds-as3645a.c
> @@ -668,7 +668,7 @@ static int as3645a_v4l2_setup(struct as3645a *flash)
>  	};
>  
>  	strlcpy(cfg.dev_name, led->name, sizeof(cfg.dev_name));
> -	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfg.dev_name));
> +	strlcpy(cfgind.dev_name, flash->iled_cdev.name, sizeof(cfgind.dev_name));
>  
>  	flash->vf = v4l2_flash_init(
>  		&flash->client->dev, flash->flash_node, &flash->fled, NULL,
> 

Applied to for-5.4 branch of linux-leds.git.

-- 
Best regards,
Jacek Anaszewski

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

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

Thread overview: 9+ 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 ` Joe Perches
2019-07-04 23:57 ` [PATCH 2/8] leds: as3645a: Fix misuse of strlcpy Joe Perches
2019-07-04 23:57   ` Joe Perches
2019-07-05  7:33   ` Sakari Ailus
2019-07-05  7:33     ` Sakari Ailus
2019-07-05 20:23   ` Pavel Machek
2019-07-05 20:23     ` Pavel Machek
2019-07-15 18:29   ` Jacek Anaszewski

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).