From: Arnd Bergmann Date: Wed, 11 Jan 2017 13:41:40 +0000 (+0100) Subject: ARM: mv78xx0: fix possible PCI buffer overflow X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5de267b299829b99990305ad0440753bb8aa3de2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ARM: mv78xx0: fix possible PCI buffer overflow gcc-7.0 reports a potential array overflow: arch/arm/mach-mv78xx0/pcie.c: In function 'mv78xx0_pcie_preinit': arch/arm/mach-mv78xx0/pcie.c:81:4: error: output may be truncated before the last format character [-Werror=format-truncation=] I haven't checked if this can actually happen, but making the array one 32-bit word longer addresses the warning and makes it completely safe. Signed-off-by: Arnd Bergmann Signed-off-by: Gregory CLEMENT --- diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index 13a7d72ee0c4..81ff4327a962 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c @@ -29,7 +29,7 @@ struct pcie_port { u8 root_bus_nr; void __iomem *base; spinlock_t conf_lock; - char mem_space_name[16]; + char mem_space_name[20]; struct resource res; };