Re: [PATCH] libdw: Make sure dirarray is always properly freed in dwarf_getsrclines.

2018-06-08 Thread Mark Wielaard
On Tue, 2018-06-05 at 22:33 +0200, Mark Wielaard wrote: > If there were more than 256 directories in the table and there was > illegal DWARF before we read them all, then we might not free the > dirarray (or the wrong one). Fix by defining the dirarray early > (before the first data sanity check) a

[PATCH] libdw: Make sure dirarray is always properly freed in dwarf_getsrclines.

2018-06-05 Thread Mark Wielaard
If there were more than 256 directories in the table and there was illegal DWARF before we read them all, then we might not free the dirarray (or the wrong one). Fix by defining the dirarray early (before the first data sanity check) and making sure it is not (still) equal to dirstack before freein