Skip to content
Commit 71f3c192 authored by George Rimar's avatar George Rimar
Browse files

[Object/ELF] - Do not crash on invalid section index.

If object has wrong (large) string table index and
also incorrect large value for amount of sections in total,
then section index passes the check:

  if (Index >= getNumSections())
    return object_error::invalid_section_index;

But result pointer then is far after end of file data, what
result in a crash.

Differential revision: https://reviews.llvm.org/D25081

llvm-svn: 284369
parent ada28620
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment