android_kernel_motorola_sm6375/drivers/firmware
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Rasmus Villemoes a4ed602977 efi: cper: fix snprintf() use in cper_dimm_err_location()
[ Upstream commit 942859d969de7f6f7f2659a79237a758b42782da ]

snprintf() should be given the full buffer size, not one less. And it
guarantees nul-termination, so doing it manually afterwards is
pointless.

It's even potentially harmful (though probably not in practice because
CPER_REC_LEN is 256), due to the "return how much would have been
written had the buffer been big enough" semantics. I.e., if the bank
and/or device strings are long enough that the "DIMM location ..."
output gets truncated, writing to msg[n] is a buffer overflow.

Signed-off-by: Rasmus Villemoes <[email protected]>
Fixes: 3760cd2040 ("CPER: Adjust code flow of some functions")
Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2021-06-10 13:37:03 +02:00
..
arm_scmi firmware: arm_scmi: Add missing Rx size re-initialisation 2020-11-05 11:43:12 +01:00
broadcom
efi efi: cper: fix snprintf() use in cper_dimm_err_location() 2021-06-10 13:37:03 +02:00
google
imx firmware: imx: select SOC_BUS to fix firmware build 2021-02-03 23:25:59 +01:00
meson
psci
tegra
xilinx
arm_scpi.c firmware: arm_scpi: Prevent the ternary sign expansion bug 2021-05-26 12:05:14 +02:00
arm_sdei.c
dmi-id.c
dmi-sysfs.c
dmi_scan.c
edd.c
iscsi_ibft.c
iscsi_ibft_find.c
Kconfig firmware: qcom-scm: Fix QCOM_SCM configuration 2021-05-14 09:44:22 +02:00
Makefile
memmap.c
pcdp.c
pcdp.h
qcom_scm-32.c
qcom_scm-64.c
qcom_scm.c
qcom_scm.h
qemu_fw_cfg.c
raspberrypi.c
scpi_pm_domain.c
stratix10-rsu.c
stratix10-svc.c
ti_sci.c
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c