android_kernel_sony_sdm845/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tobin C. Harding 316c6cc08d lib/string: Add strscpy_pad() function
[ Upstream commit 458a3bf82df4fe1f951d0f52b1e0c1e9d5a88a3b ]

We have a function to copy strings safely and we have a function to copy
strings and zero the tail of the destination (if source string is
shorter than destination buffer) but we do not have a function to do
both at once.  This means developers must write this themselves if they
desire this functionality.  This is a chore, and also leaves us open to
off by one errors unnecessarily.

Add a function that calls strscpy() then memset()s the tail to zero if
the source string is shorter than the destination buffer.

Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Tobin C. Harding <tobin@kernel.org>
Signed-off-by: Shuah Khan <shuah@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-02-23 13:59:14 +01:00
..
acpi ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro 2020-03-11 07:53:05 +01:00
asm-generic vmlinux.lds.h: Add PGO and AutoFDO input sections 2021-01-17 13:57:54 +01:00
clocksource
crypto crypto: af_alg - fix use-after-free in af_alg_accept() due to bh_lock_sock() 2020-07-09 09:35:55 +02:00
drm drm: mst: Fix query_payload ack reply struct 2020-01-04 13:39:00 +01:00
dt-bindings dt-bindings: reset: meson8b: fix duplicate reset IDs 2020-01-23 08:19:38 +01:00
keys KEYS: user: Align the payload buffer 2019-02-27 10:07:00 +01:00
kvm arm/arm64: KVM: Add PSCI version selection API 2018-05-09 09:50:19 +02:00
linux lib/string: Add strscpy_pad() function 2021-02-23 13:59:14 +01:00
math-emu math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning 2019-12-21 10:41:02 +01:00
media media: v4l2-device.h: Explicitly compare grp{id,mask} to zero in v4l2_device macros 2020-02-28 15:42:24 +01:00
memory
misc
net net: sched: prevent invalid Scell_log shift count 2021-01-12 19:49:02 +01:00
pcmcia
ras
rdma IB/cma: Fix reference count leak when no ipv4 addresses are set 2020-06-03 08:16:33 +02:00
rxrpc
scsi scsi: libiscsi: Fix NOP race condition 2020-12-02 08:31:26 +01:00
soc irqchip/eznps: Fix build error for !ARC700 builds 2020-09-23 08:46:10 +02:00
sound ALSA: compress: fix partial_drain completion state 2020-07-22 09:10:45 +02:00
target target: add XCOPY target/segment desc sense codes 2021-01-17 13:57:53 +01:00
trace scsi: target: core: Add CONTROL field for trace events 2020-10-29 09:05:43 +01:00
uapi uapi: move constants from <linux/kernel.h> to <linux/const.h> 2021-01-09 13:35:49 +01:00
video udlfb: set optimal write delay 2018-09-09 20:01:25 +02:00
xen xen/xenbus: Count pending messages for each watch 2021-01-09 13:35:50 +01:00
Kbuild