[libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (#68815)

I was running the tests with baremetal picolibc which has a linker
script that __eh_frame_start==__eh_frame_end (not equal to zero) in
case there is no .eh_frame_hdr.
I noticed that libunwind was trying to read nonsense data because it
was printing messages such as
`libunwind: unsupported .eh_frame_hdr version: 20 at
https://github.com/llvm/llvm-project/commit/8000d308146ebf49cb364cb600e28a0a42e22c83`

This change adds a ehHdr size check to avoid reading this out-of-bounds
data and potentially crashing.

GitOrigin-RevId: eb21049b4b904b072679ece60e73c6b0dc0d1ebf
1 file changed
tree: 8d48776ac381415634718e4ca3c65f9101b09817
  1. cmake/
  2. docs/
  3. include/
  4. src/
  5. test/
  6. .clang-format
  7. CMakeLists.txt
  8. LICENSE.TXT