cmELF: Protect against OOM on malformed files

Cap the number of ELF sections, the section size, and the number of
dynamic entries to reasonable limits for real-world binaries to prevent
OOM on malformed inputs.
2 files changed