If ino == last_ino && dmajor == last_dmajor && dminor == last_dminor then
we expect the file names to be the same as well. Which is reasonable if
the input came from the /proc file system. But there could be bad user
input if the file was supplied through dwfl_linux_proc_maps_report.
Instead of asserting on the bad input, just signal a bad_report.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
2014-02-26 Mark Wielaard <mjw@redhat.com>
+ * linux-proc-maps.c (proc_maps_report): Don't assert on bad input.
+
+2014-02-26 Mark Wielaard <mjw@redhat.com>
+
* elf-from-memory.c (elf_from_remote_memory): Check against p64
p_type in case ELFCLASS64, not against p32 p_type.
&& ino == last_ino && dmajor == last_dmajor && dminor == last_dminor)
{
/* This is another portion of the same file's mapping. */
- assert (!strcmp (last_file, file));
+ if (strcmp (last_file, file) != 0)
+ goto bad_report;
high = end;
}
else