Skip to content

Commit

Permalink
runtime_loader: Do not assume executable has dynamic segment
Browse files Browse the repository at this point in the history
This prevents a crash when loading a statically linked executable.

Fixes #12287.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
  • Loading branch information
Simon South authored and pulkomandy committed Oct 26, 2015
1 parent 078b88b commit d5447eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/system/runtime_loader/elf_symbol_lookup.h
Expand Up @@ -58,7 +58,7 @@ struct SymbolLookupInfo {
struct SymbolLookupCache {
SymbolLookupCache(image_t* image)
:
fTableSize(image->symhash[1]),
fTableSize(image->symhash != NULL ? image->symhash[1] : 0),
fValues(NULL),
fDSOs(NULL),
fValuesResolved(NULL)
Expand Down

0 comments on commit d5447eb

Please sign in to comment.