diff options
author | Michael Munday <mike.munday@ibm.com> | 2017-11-24 11:37:11 -0500 |
---|---|---|
committer | Dave Watson <davejwatson@fb.com> | 2017-11-28 07:55:25 -0800 |
commit | 29137c6fa9303eedc310a467e508716813174414 (patch) | |
tree | 0d8704c5e37e0c474c5ea89f65fe527e98e0f7a6 /include | |
parent | 02a3cc2cf3847ac4ba41913a035eff30eeca20a6 (diff) | |
download | libunwind-29137c6fa9303eedc310a467e508716813174414.tar.gz |
dwarf: Fix size of state to avoid corrupting rs_stack
DW_CFA_remember_state used memcpy to overwrite state with the value
of rs_current. Unfortunately rs_current was slightly larger than state,
possibly resulting in rs_stack->next being overwritten.
Fix this by making the type of state match the type of rs_current and
using an assigment to perform the copy rather than memcpy. This should
ensure that the types match in future.
Diffstat (limited to 'include')
-rw-r--r-- | include/dwarf.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/dwarf.h b/include/dwarf.h index f45d0e4a..48831e30 100644 --- a/include/dwarf.h +++ b/include/dwarf.h @@ -260,7 +260,7 @@ dwarf_reg_state_t; typedef struct dwarf_stackable_reg_state { struct dwarf_stackable_reg_state *next; /* for rs_stack */ - dwarf_reg_only_state_t state; + dwarf_reg_state_t state; } dwarf_stackable_reg_state_t; |