mirror of
https://github.com/serge1/ELFIO.git
synced 2025-03-23 22:43:55 +00:00
Update elfio_symbols.hpp
if the section header is bad, return 0 when get symbol num
This commit is contained in:
parent
69fc128bd5
commit
7a1db4060f
@ -42,7 +42,8 @@ template <class S> class symbol_section_accessor_template
|
||||
Elf_Xword get_symbols_num() const
|
||||
{
|
||||
Elf_Xword nRet = 0;
|
||||
if ( 0 != symbol_section->get_entry_size() ) {
|
||||
if ( 0 != symbol_section->get_entry_size() &&
|
||||
symbol_section->get_size() < symbol_section->get_stream_size() ) {
|
||||
nRet =
|
||||
symbol_section->get_size() / symbol_section->get_entry_size();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user