Date: Fri, 2 Jan 2015 02:47:48 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276524 - head/contrib/elftoolchain/libelf Message-ID: <201501020247.t022lm7B014440@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Fri Jan 2 02:47:47 2015 New Revision: 276524 URL: https://svnweb.freebsd.org/changeset/base/276524 Log: 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 Modified: head/contrib/elftoolchain/libelf/libelf_ar_util.c Modified: head/contrib/elftoolchain/libelf/libelf_ar_util.c ============================================================================== --- head/contrib/elftoolchain/libelf/libelf_ar_util.c Fri Jan 2 01:05:08 2015 (r276523) +++ head/contrib/elftoolchain/libelf/libelf_ar_util.c Fri Jan 2 02:47:47 2015 (r276524) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501020247.t022lm7B014440>