]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: Make sure dirarray is always properly freed in dwarf_getsrclines.
authorMark Wielaard <mark@klomp.org>
Tue, 5 Jun 2018 20:27:25 +0000 (22:27 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 8 Jun 2018 10:03:14 +0000 (12:03 +0200)
commit7009db70ca21d2b26cabd1c9fa1a50c35b6342b1
tree87a21dfc259c0ab4990e1355d13d3332c7cd1894
parent50478b80cede080891996cf080581ca2a0611ce8
libdw: Make sure dirarray is always properly freed in dwarf_getsrclines.

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 freeing.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/ChangeLog
libdw/dwarf_getsrclines.c