Skip to content

Commit

Permalink
[libunwind] Undefined behaviour pointer arithmetic with null pointer …
Browse files Browse the repository at this point in the history
…(#98648)

Fixes #91144
  • Loading branch information
DanielKristofKiss authored Aug 5, 2024
1 parent dd8a9e2 commit 710590e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libunwind/src/UnwindCursor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ void DwarfFDECache<A>::iterateCacheEntries(void (*func)(
}
#endif // defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND)


#define arrayoffsetof(type, index, field) ((size_t)(&((type *)0)[index].field))
#define arrayoffsetof(type, index, field) \
(sizeof(type) * (index) + offsetof(type, field))

#if defined(_LIBUNWIND_SUPPORT_COMPACT_UNWIND)
template <typename A> class UnwindSectionHeader {
Expand Down

0 comments on commit 710590e

Please sign in to comment.