runtime_loader: Do not assume executable has dynamic segment

This prevents a crash when loading a statically linked executable.

Fixes #12287.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
Simon South 2015-10-25 06:27:26 -04:00 committed by Adrien Destugues
parent 078b88b12d
commit d5447eb9c0

View File

@ -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)