+2016-08-12 Mark Wielaard <mjw@redhat.com>
+
+ * link_map.c (dwfl_link_map_report): Fix assert, set in.d_size.
+
2016-04-14 Mark Wielaard <mjw@redhat.com>
* dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Free match
/* Report modules by examining dynamic linker data structures.
- Copyright (C) 2008-2015 Red Hat, Inc.
+ Copyright (C) 2008-2016 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
}
off_t off = ehdr->e_phoff;
assert (in.d_buf == NULL);
- assert (in.d_size == phnum * phent);
+ /* Note this in the !in_ok path. That means memory_callback
+ failed. But the callback might still have reset the d_size
+ value (to zero). So explicitly set it here again. */
+ in.d_size = phnum * phent;
in.d_buf = malloc (in.d_size);
if (unlikely (in.d_buf == NULL))
{