mirror of
https://github.com/serge1/ELFIO.git
synced 2025-03-22 10:20:50 +00:00
Don't pass NULL pointer to set_name function
This commit is contained in:
parent
d439d83458
commit
bf2efcc32f
@ -343,7 +343,10 @@ class elfio
|
|||||||
string_section_accessor str_reader( sections[shstrndx] );
|
string_section_accessor str_reader( sections[shstrndx] );
|
||||||
for ( Elf_Half i = 0; i < num; ++i ) {
|
for ( Elf_Half i = 0; i < num; ++i ) {
|
||||||
Elf_Word offset = sections[i]->get_name_string_offset();
|
Elf_Word offset = sections[i]->get_name_string_offset();
|
||||||
sections[i]->set_name( str_reader.get_string( offset ) );
|
const char* p = str_reader.get_string( offset );
|
||||||
|
if ( p != 0 ) {
|
||||||
|
sections[i]->set_name( p );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user