2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-11 07:04:04 +08:00
linux-next/tools/perf/arch/x86
Wang Nan 3b27d13940 perf dwarf: Fix potential array out of bounds access
There is a problem in the dwarf-regs.c files for sh, sparc and x86 where
it is possible to make an out-of-bounds array access when searching for
register names.

This patch fixes it by replacing '<=' to '<', so when register (number
== XXX_MAX_REGS), get_arch_regstr() will return NULL.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Reviewed-by: Matt Fleming <matt@console-pimps.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@huawei.com
Link: http://lkml.kernel.org/r/1441078184-105038-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-09-01 11:33:48 -03:00
..
include tools: Consolidate types.h 2014-05-01 21:22:39 +02:00
tests perf build: Add arch x86 objects building 2015-02-12 13:12:01 -03:00
util perf dwarf: Fix potential array out of bounds access 2015-09-01 11:33:48 -03:00
Build perf build: Add arch x86 objects building 2015-02-12 13:12:01 -03:00
Makefile perf build: Add arch x86 objects building 2015-02-12 13:12:01 -03:00