Fix bad elf data handling.

When trying to find a debug frame:

- Any file was treated as an elf file without verification.
- The index into the section header was used without verifying it is
  valid.

Both of these bugs are now fixed.

Bug: 26299490
Change-Id: Ib5ef710e6413e20243935e9451a0e0bb797894fc
1 file changed