program_header->p_offset,
program_header->p_filesz,
ELF_T_NHDR);
+ if (!data)
+ continue;
while (note_offset < data->d_size &&
(note_offset = gelf_getnote(data, note_offset, ¬e_header, &name_offset, &desc_offset)) > 0) {
GElf_Phdr mem, *program_header;
Elf_Data *data;
- /* The core file stores the ELF files in the PT_LOAD segment .*/
+ /* The core file stores the ELF files in the PT_LOAD segment. */
program_header = gelf_getphdr(c->elf, i, &mem);
if (!program_header || program_header->p_type != PT_LOAD)
continue;