mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-18 22:15:46 +01:00
libelf: Return an error instead of asserting on an invalid ar file
Upstream elftoolchain ticket 467 http://sourceforge.net/p/elftoolchain/tickets/467/ Reported by: Alexander Cherepanov MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
91a82f9585
commit
bc5438c566
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276524
@ -279,7 +279,8 @@ _libelf_ar_open(Elf *e, int reporterror)
|
||||
*/
|
||||
if (arh.ar_name[0] == '/') {
|
||||
|
||||
assert(sz > 0);
|
||||
if (sz == 0)
|
||||
goto error;
|
||||
|
||||
e->e_flags |= LIBELF_F_AR_VARIANT_SVR4;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user