Skip to content
Commit a34dbfb0 authored by Will Deacon's avatar Will Deacon Committed by Russell King
Browse files

ARM: 7160/1: setup: avoid overflowing {elf,arch}_name from proc_info_list



setup_processor copies the arch_name and elf_name fields out of the
selected proc_info_list into two fixed size buffers.

Since the proc_info_list structure is defined in a proc_*.S assembly
file, this can lead to subtle errors if the strings defined there are
too long (for example, corrupting the machine ID).

This patch uses snprintf instead of sprintf to ensure that these buffers
are not overrun.

Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 798681bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment