linux-stable/drivers
Kees Cook 096a8aac6b clean up scary strncpy(dst, src, strlen(src)) uses
Fix various weird constructions of strncpy(dst, src, strlen(src)).

Length limits should be about the space available in the destination,
not repurposed as a method to either always include or always exclude a
trailing NULL byte.  Either the NULL should always be copied (using
strlcpy), or it should not be copied (using something like memcpy).
Readable code should not depend on the weird behavior of strncpy when it
hits the length limit.  Better to avoid the anti-pattern entirely.

[akpm@linux-foundation.org: revert getdelays.c part due to missing bsd/string.h]
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>	[staging]
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>	[acpi]
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Ursula Braun <ursula.braun@de.ibm.com>
Cc: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Cc: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-03 16:07:41 -07:00
..
accessibility
acpi clean up scary strncpy(dst, src, strlen(src)) uses 2013-07-03 16:07:41 -07:00
amba
ata libata-acpi: add back ACPI based hotplug functionality 2013-06-25 00:51:33 +02:00
atm
auxdisplay
base firmware loader: fix another compile warning with PM_SLEEP unset 2013-06-25 21:04:22 -07:00
bcma
block block: do not pass disk names as format strings 2013-07-03 16:07:25 -07:00
bluetooth Bluetooth: btmrvl: fix thread stopping race 2013-06-13 13:05:40 -04:00
bus ARM SoC device tree changes 2013-07-02 14:23:01 -07:00
cdrom drivers/cdrom/cdrom.c: use kzalloc() for failing hardware 2013-07-03 16:07:25 -07:00
char Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-03 09:10:19 -07:00
clk ARM SoC late changes 2013-07-02 14:42:51 -07:00
clocksource Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-07-03 09:46:29 -07:00
connector
cpufreq ARM SoC driver specific changes 2013-07-02 14:33:21 -07:00
cpuidle ARM SoC specific changes 2013-07-02 13:43:38 -07:00
crypto ARM SoC driver specific changes 2013-07-02 14:33:21 -07:00
dca
devfreq
dio
dma drivers/dma/pl330.c: fix locking in pl330_free_chan_resources() 2013-07-03 16:07:22 -07:00
edac
eisa
extcon extcon: Palmas Extcon Driver 2013-06-17 16:08:36 -07:00
firewire
firmware Merge 3.10-rc6 into driver-core-next 2013-06-17 16:57:20 -07:00
fmc FMC: fix error handling in probe() function 2013-06-24 16:23:25 -07:00
gpio Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-07-02 16:14:35 -07:00
gpu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-02 09:28:37 -07:00
hid HID: multitouch: prevent memleak with the allocated name 2013-06-12 11:13:38 +02:00
hsi
hv drivers: hv: allocate synic structures before hv_synic_init() 2013-06-24 16:24:17 -07:00
hwmon
hwspinlock
i2c ARM SoC specific changes 2013-07-02 13:43:38 -07:00
ide
idle
iio staging:iio:adis16130: Move out of staging 2013-06-11 20:34:36 +01:00
infiniband
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2013-06-23 16:12:46 -10:00
iommu Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-07-02 16:15:23 -07:00
ipack
irqchip Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-07-02 16:14:35 -07:00
isdn
leds
lguest x86, flags: Rename X86_EFLAGS_BIT1 to X86_EFLAGS_FIXED 2013-06-25 16:25:32 -07:00
macintosh
mailbox mailbox/omap: move the OMAP mailbox framework to drivers 2013-06-11 11:41:51 -05:00
md A few bugfixes for md 2013-06-13 10:13:29 -07:00
media ARM SoC specific changes 2013-07-02 13:43:38 -07:00
memory memory: tegra30-mc: Fix IRQ handler. 2013-06-17 16:46:06 -07:00
memstick
message
mfd Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-07-02 16:14:35 -07:00
misc Driver core patches for 3.11-rc1 2013-07-02 11:44:19 -07:00
mmc Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-07-03 09:46:29 -07:00
mtd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-03 09:10:19 -07:00
net Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-03 09:10:19 -07:00
nfc
ntb
nubus
of PM voltage domain clean-up via Kevin Hilman <khilman@linaro.org>: 2013-06-20 16:41:37 +02:00
oprofile
parisc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-03 09:10:19 -07:00
parport
pci Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-03 09:10:19 -07:00
pcmcia Driver core patches for 3.11-rc1 2013-07-02 11:44:19 -07:00
pinctrl ARM SoC late changes 2013-07-02 14:42:51 -07:00
platform
pnp isapnp: switch to fixed_size_llseek() 2013-06-29 12:57:48 +04:00
power
pps
ps3
ptp build some drivers only when compile-testing 2013-06-24 16:41:32 -07:00
pwm
rapidio
regulator ARM SoC device tree changes 2013-07-02 14:23:01 -07:00
remoteproc mailbox/omap: move the OMAP mailbox framework to drivers 2013-06-11 11:41:51 -05:00
reset
rpmsg
rtc imx soc changes for 3.11: 2013-06-20 02:15:45 +02:00
s390 clean up scary strncpy(dst, src, strlen(src)) uses 2013-07-03 16:07:41 -07:00
sbus
scsi block: do not pass disk names as format strings 2013-07-03 16:07:25 -07:00
sfi
sh
sn
spi ARM SoC specific changes 2013-07-02 13:43:38 -07:00
ssb
ssbi Cleanups for MSM for 3.11 2013-06-14 18:28:02 -07:00
staging clean up scary strncpy(dst, src, strlen(src)) uses 2013-07-03 16:07:41 -07:00
target iscsi-target: Remove left over v3.10-rc debug printks 2013-06-20 16:47:41 -07:00
tc
thermal thermal: exynos: Support both EXYNOS4X12 SoCs 2013-06-19 01:31:50 +09:00
tty Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-07-03 09:10:19 -07:00
uio uio: use vma_pages() to replace (vm_end - vm_start) >> PAGE_SHIFT 2013-07-03 16:07:26 -07:00
usb ARM SoC late changes 2013-07-02 14:42:51 -07:00
uwb USB: HWA: fix device probe failure 2013-06-24 16:20:43 -07:00
vfio vfio: remap_pfn_range() sets all those flags... 2013-06-29 12:46:41 +04:00
vhost vhost: fix ubuf_info cleanup 2013-06-11 02:46:21 -07:00
video Merge branch 'for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2013-07-02 19:53:30 -07:00
virt
virtio mm: correctly update zone->managed_pages 2013-07-03 16:07:33 -07:00
vlynq
vme vme: vme_tsi148.c: fix error return code in tsi148_probe() 2013-06-24 16:23:25 -07:00
w1
watchdog ARM SoC specific changes 2013-07-02 13:43:38 -07:00
xen mm: correctly update zone->managed_pages 2013-07-03 16:07:33 -07:00
zorro zorro: switch to fixed_size_llseek() 2013-06-29 12:57:28 +04:00
Kconfig FMC: create drivers/fmc and toplevel Kconfig question 2013-06-17 16:38:57 -07:00
Makefile FMC: create drivers/fmc and toplevel Kconfig question 2013-06-17 16:38:57 -07:00