In-memory nested archives
Alan Modra
amodra@gmail.com
Mon Feb 20 01:56:51 GMT 2023
More information about the Binutils mailing list
Mon Feb 20 01:56:51 GMT 2023
- Previous message (by thread): [PATCH v4 0/5] Add support for CRC64 generation in linker
- Next message (by thread): New Malay PO file for 'gprof' (version 2.39.90)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
alpha-linuxecoff has compressed archives that are decompressed to a
bfd-in-memory. We'd need to handle quite a lot of corner cases to
support nesting of such archives, so just stop it before we run into
segfaults later.
* opncls.c (_bfd_new_bfd_contained_in): Prohibit nested
archives in memory.
diff --git a/bfd/opncls.c b/bfd/opncls.c
index eeac5825dbf..f0f4ed55ca4 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -103,6 +103,12 @@ _bfd_new_bfd_contained_in (bfd *obfd)
{
bfd *nbfd;
+ /* Nested archives in bims are unsupported. */
+ if ((obfd->flags & BFD_IN_MEMORY) != 0)
+ {
+ bfd_set_error (bfd_error_malformed_archive);
+ return NULL;
+ }
nbfd = _bfd_new_bfd ();
if (nbfd == NULL)
return NULL;
--
Alan Modra
Australia Development Lab, IBM
- Previous message (by thread): [PATCH v4 0/5] Add support for CRC64 generation in linker
- Next message (by thread): New Malay PO file for 'gprof' (version 2.39.90)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list