Skip to content
Snippets Groups Projects
Commit 16ba21f7 authored by Brad King's avatar Brad King
Browse files

Merge branch 'avoid-divide-by-zero' into release

parents aa0460b3 f5cd92a8
No related branches found
No related tags found
No related merge requests found
......@@ -567,8 +567,14 @@ bool cmELFInternalImpl<Types>::LoadDynamicSection()
return true;
}
// Allocate the dynamic section entries.
// If there are no entries we are done.
ELF_Shdr const& sec = this->SectionHeaders[this->DynamicSectionIndex];
if(sec.sh_entsize == 0)
{
return false;
}
// Allocate the dynamic section entries.
int n = static_cast<int>(sec.sh_size / sec.sh_entsize);
this->DynamicSectionEntries.resize(n);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment