+2010-06-04 Roland McGrath <roland@redhat.com>
+
+ * unstrip.c (copy_elided_sections): Bail if stripped file has more
+ sections than unstripped file, rather than getting confused later.
+
2010-06-01 Roland McGrath <roland@redhat.com>
* readelf.c (dwarf_form_string): Handle DWARF 4 forms.
ELF_CHECK (elf_getshdrnum (stripped, &stripped_shnum) == 0,
_("cannot get section count: %s"));
+ if (unlikely (stripped_shnum > unstripped_shnum))
+ error (EXIT_FAILURE, 0, _("\
+more sections in stripped file than debug file -- arguments reversed?"));
+
/* Cache the stripped file's section details. */
struct section sections[stripped_shnum - 1];
Elf_Scn *scn = NULL;