* [PATCH 0/8] treewide: correct misuses of strscpy/strlcpy
@ 2019-07-04 23:57 Joe Perches
2019-07-04 23:57 ` [PATCH 7/8] tty: hvcs: Fix odd use of strlcpy Joe Perches
0 siblings, 1 reply; 2+ 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: netdev, linux-kernel, linux-input
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] 2+ messages in thread
* [PATCH 7/8] tty: hvcs: Fix odd use 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
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2019-07-04 23:57 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, linuxppc-dev, Jiri Slaby
Use the typical style of array, not the equivalent &array[0].
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/tty/hvc/hvcs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index cb4db1b3ca3c..b6c1c1be06f9 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -871,8 +871,8 @@ static void hvcs_set_pi(struct hvcs_partner_info *pi, struct hvcs_struct *hvcsd)
hvcsd->p_partition_ID = pi->partition_ID;
/* copy the null-term char too */
- strlcpy(&hvcsd->p_location_code[0],
- &pi->location_code[0], sizeof(hvcsd->p_location_code));
+ strlcpy(hvcsd->p_location_code, pi->location_code,
+ sizeof(hvcsd->p_location_code));
}
/*
--
2.15.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-05 0:01 UTC | newest]
Thread overview: 2+ 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 7/8] tty: hvcs: Fix odd use of strlcpy Joe Perches
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).