From 12faebc6fa9e73819f7f6e28066110c08553c012 Mon Sep 17 00:00:00 2001 From: Android Tools Maintainers Date: Sat, 28 May 2022 12:13:51 +0100 Subject: [PATCH] Off-by-one error in the dwarf_to_unw_regnum function in include/dwarf_i.h in libunwind 1.1 allows local users to have unspecified impact via invalid dwarf opcodes. Gbp-Pq: Topic external/libunwind Gbp-Pq: Name 20150704-CVE-2015-3239_dwarf_i.h.patch --- external/libunwind/include/dwarf_i.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/libunwind/include/dwarf_i.h b/external/libunwind/include/dwarf_i.h index 0e728457..86dcdb8e 100644 --- a/external/libunwind/include/dwarf_i.h +++ b/external/libunwind/include/dwarf_i.h @@ -20,7 +20,7 @@ extern const uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH]; /* REG is evaluated multiple times; it better be side-effects free! */ # define dwarf_to_unw_regnum(reg) \ - (((reg) <= DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0) + (((reg) < DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0) #endif #ifdef UNW_LOCAL_ONLY -- 2.30.2