+2019-04-28 Mark Wielaard <mark@klomp.org>
+
+ * elfcmp.c (main): Check shdr1 and shdr2 are not NULL.
+
2019-04-03 Mark Wielaard <mark@klomp.org>
* readelf.c (attr_callback): Print DW_AT_data_member_location as
if (shdr1 != NULL)
sname1 = elf_strptr (elf1, shstrndx1, shdr1->sh_name);
}
- while (scn1 != NULL
+ while (scn1 != NULL && shdr1 != NULL
&& ebl_section_strip_p (ebl1, shdr1, sname1, true, false));
GElf_Shdr shdr2_mem;
if (shdr2 != NULL)
sname2 = elf_strptr (elf2, shstrndx2, shdr2->sh_name);
}
- while (scn2 != NULL
+ while (scn2 != NULL && shdr2 != NULL
&& ebl_section_strip_p (ebl2, shdr2, sname2, true, false));
- if (scn1 == NULL || scn2 == NULL)
+ if (scn1 == NULL || scn2 == NULL || shdr1 == NULL || shdr2 == NULL)
break;
if (gaps != gaps_ignore && (shdr1->sh_flags & SHF_ALLOC) != 0)