diff options
author | Alan Modra <amodra@gmail.com> | 2020-03-14 11:50:22 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-03-14 17:24:19 +1030 |
commit | 780f96aed2b4db1014e8fa2b50118676d8af0e46 (patch) | |
tree | 06cceab0c41b0978c51811e1c280733045ee1488 /binutils/readelf.c | |
parent | f761cb13a903da6a5a1b3f9a5cb984600124ac31 (diff) | |
download | gdb-780f96aed2b4db1014e8fa2b50118676d8af0e46.zip gdb-780f96aed2b4db1014e8fa2b50118676d8af0e46.tar.gz gdb-780f96aed2b4db1014e8fa2b50118676d8af0e46.tar.bz2 |
readelf large memory allocation
* elfcomm.h (setup_archive): Update prototype.
* elfcomm.c (setup_archive): Add file_size parameter and sanity
check longnames_size.
(setup_nested_archive): Get file size and pass to setup_archive.
* elfedit.c (process_archive): Likewise.
* readelf.c (process_archive): Pass filedata->file_size to
setup_archive.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index b106e8c..0f8a080 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -20247,7 +20247,8 @@ process_archive (Filedata * filedata, bfd_boolean is_thin_archive) nested_arch.longnames = NULL; if (setup_archive (&arch, filedata->file_name, filedata->handle, - is_thin_archive, do_archive_index) != 0) + filedata->file_size, is_thin_archive, + do_archive_index) != 0) { ret = FALSE; goto out; |