linux/drivers
David Herrmann 4d26d1d1e8 Revert "HID: uhid: use strlcpy() instead of strncpy()"
This reverts commit 336fd4f5f2.

Please note that `strlcpy()` does *NOT* do what you think it does.
strlcpy() *ALWAYS* reads the full input string, regardless of the
'length' parameter. That is, if the input is not zero-terminated,
strlcpy() will *READ* beyond input boundaries. It does this, because it
always returns the size it *would* copy if the target was big enough,
not the truncated size it actually copied.

The original code was perfectly fine. The hid device is
zero-initialized and the strncpy() functions copied up to n-1
characters. The result is always zero-terminated this way.

This is the third time someone tried to replace strncpy with strlcpy in
this function, and gets it wrong. I now added a comment that should at
least make people reconsider.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-11-19 14:32:27 +01:00
..
accessibility
acpi mm/memory_hotplug: make add_memory() take the device_hotplug_lock 2018-10-31 08:54:17 -07:00
amba
android
ata
atm
auxdisplay
base mm/memory_hotplug: fix online/offline_pages called w.o. mem_hotplug_lock 2018-10-31 08:54:17 -07:00
bcma
block The highlights are: 2018-10-31 14:42:31 -07:00
bluetooth
bus ARM: SoC driver updates for 4.17 2018-10-29 15:16:01 -07:00
cdrom
char
clk This time it looks like a quieter release cycle in the clk tree. I guess that's 2018-10-31 11:08:30 -07:00
clocksource
connector
cpufreq
cpuidle More power management updates for 4.20-rc1 2018-10-30 09:08:07 -07:00
crypto
dax
dca
devfreq
dio
dma
dma-buf
edac ARM: SoC driver updates for 4.17 2018-10-29 15:16:01 -07:00
eisa
extcon
firewire
firmware platform-drivers-x86 for v4.20-1 2018-11-01 08:42:21 -07:00
fmc
fpga
fsi
gnss
gpio
gpu
hid Revert "HID: uhid: use strlcpy() instead of strncpy()" 2018-11-19 14:32:27 +01:00
hsi
hv
hwmon
hwspinlock
hwtracing
i2c More ACPI updates for 4.20-rc1 2018-10-30 09:15:31 -07:00
ide
idle
iio
infiniband
input
iommu mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
ipack
irqchip
isdn
leds
lightnvm
macintosh memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
mailbox
mcb
md
media media updates for v4.20-rc1 2018-10-31 10:53:29 -07:00
memory
memstick
message
mfd chrome-platform for v4.20 2018-10-31 16:47:55 -07:00
misc
mmc
mtd mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
mux
net mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
opp
oprofile
parisc
parport
pci
pcmcia
perf
phy
pinctrl
platform platform-drivers-x86 for v4.20-1 2018-11-01 08:42:21 -07:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset ARM: SoC driver updates for 4.17 2018-10-29 15:16:01 -07:00
rpmsg
rtc
s390 mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
sbus
scsi
sfi mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
sh
siox
slimbus
sn
soc ARM: SoC driver updates for 4.17 2018-10-29 15:16:01 -07:00
soundwire
spi
spmi
ssb
staging media updates for v4.20-rc1 2018-10-31 10:53:29 -07:00
target
tc
tee
thermal Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2018-10-31 11:28:12 -07:00
thunderbolt
tty mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
uio
usb media updates for v4.20-rc1 2018-10-31 10:53:29 -07:00
uwb
vfio VFIO updates for v4.20 2018-10-31 11:01:38 -07:00
vhost
video fbdev changes for v4.20: 2018-10-31 11:41:37 -07:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen mm/memory_hotplug: make add_memory() take the device_hotplug_lock 2018-10-31 08:54:17 -07:00
zorro
Kconfig
Makefile