Skip to content
Snippets Groups Projects
Commit 88503347 authored by Tim Strazzere's avatar Tim Strazzere Committed by Serge Lamikhov-Center
Browse files

Avoid SIGSEV due to non-existant string section.

parent 812f7299
No related branches found
No related tags found
No related merge requests found
......@@ -44,12 +44,14 @@ class string_section_accessor
const char*
get_string( Elf_Word index ) const
{
if ( index < string_section->get_size() ) {
const char* data = string_section->get_data();
if ( 0 != data ) {
return data + index;
if ( string_section ) {
if ( index < string_section->get_size() ) {
const char* data = string_section->get_data();
if ( 0 != data ) {
return data + index;
}
}
}
}
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment