diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-01-11 14:41:40 +0100 |
---|---|---|
committer | Gregory CLEMENT <gregory.clement@free-electrons.com> | 2017-01-27 17:52:57 +0100 |
commit | 5de267b299829b99990305ad0440753bb8aa3de2 (patch) | |
tree | 6b1fa8b22dad79cc808f70833064fb9078dea2bd /arch/arm/mach-mv78xx0 | |
parent | 0c744ea4f77d72b3dcebb7a8f2684633ec79be88 (diff) | |
download | linux-stable-5de267b299829b99990305ad0440753bb8aa3de2.tar.gz linux-stable-5de267b299829b99990305ad0440753bb8aa3de2.tar.bz2 linux-stable-5de267b299829b99990305ad0440753bb8aa3de2.zip |
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 <arnd@arndb.de>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Diffstat (limited to 'arch/arm/mach-mv78xx0')
-rw-r--r-- | arch/arm/mach-mv78xx0/pcie.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; }; |