diff options
Diffstat (limited to 'libdwfl/dwfl_segment_report_module.c')
-rw-r--r-- | libdwfl/dwfl_segment_report_module.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libdwfl/dwfl_segment_report_module.c b/libdwfl/dwfl_segment_report_module.c index f6ad39b3..76ba1506 100644 --- a/libdwfl/dwfl_segment_report_module.c +++ b/libdwfl/dwfl_segment_report_module.c @@ -412,6 +412,12 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, start + phoff, xlatefrom.d_size)) return finish (); + /* ph_buffer_size will be zero if we got everything from the initial + buffer, otherwise it will be the size of the new buffer that + could be read. */ + if (ph_buffer_size != 0) + xlatefrom.d_size = ph_buffer_size; + xlatefrom.d_buf = ph_buffer; bool class32 = ei_class == ELFCLASS32; |