We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a678c7 commit a437584Copy full SHA for a437584
1 file changed
elf/elf.cc
@@ -103,8 +103,14 @@ elf::elf(const std::shared_ptr<loader> &l)
103
// Load sections
104
const void *sec_data = l->load(m->hdr.shoff,
105
m->hdr.shentsize * m->hdr.shnum);
106
+ if (NULL == sec_data) {
107
+ return;
108
+ }
109
for (unsigned i = 0; i < m->hdr.shnum; i++) {
110
const void *sec = ((const char*)sec_data) + i * m->hdr.shentsize;
111
+ if (NULL == sec) {
112
+ continue;
113
114
// XXX Circular reference. Maybe this should be
115
// constructed on the fly? Canonicalizing the header
116
// isn't super-cheap.
0 commit comments