From dde97a1789345b5fe744b49af84baf41e0085bbf Mon Sep 17 00:00:00 2001
From: Simon South <ssouth@simonsouth.com>
Date: Sun, 25 Oct 2015 06:27:26 -0400
Subject: [PATCH] runtime_loader: Do not assume executable has dynamic segment
This prevents a crash when loading a statically linked executable.
Fixes #12287.
---
src/system/runtime_loader/elf_symbol_lookup.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/system/runtime_loader/elf_symbol_lookup.h b/src/system/runtime_loader/elf_symbol_lookup.h
index 433c9ab..247c945 100644
a
|
b
|
struct SymbolLookupInfo {
|
58 | 58 | struct SymbolLookupCache { |
59 | 59 | SymbolLookupCache(image_t* image) |
60 | 60 | : |
61 | | fTableSize(image->symhash[1]), |
| 61 | fTableSize(image->symhash != NULL ? image->symhash[1] : 0), |
62 | 62 | fValues(NULL), |
63 | 63 | fDSOs(NULL), |
64 | 64 | fValuesResolved(NULL) |