]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r239962:
authordim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 7 Sep 2012 18:03:29 +0000 (18:03 +0000)
committerdim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 7 Sep 2012 18:03:29 +0000 (18:03 +0000)
commitdcc635fedf3a227fec35cf09aaaac8df205fce10
tree070e8e656a34f8e2d3334c93209f6ce2f39ed326
parent2ccd7310fbde4a0ef1c7c7211ff570063e117c70
MFC r239962:

Fix a twelve year old bug in readelf: when process_dynamic_segment()
encounters a DT_RUNPATH entry, the global dynamic_info[] array is
overrun, causing some other global variable to be overwritten.

In my testcase, this was the section_headers variable, leading to
segfaults or jemalloc assertions when it was freed later on.

Thanks to Koop Mast for providing samples of a few "bad" .so files.

git-svn-id: svn://svn.freebsd.org/base/stable/8@240208 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
contrib/binutils/binutils/readelf.c