summaryrefslogtreecommitdiff
path: root/packages/binutils/2.37/0014-pr28422-build_id-use-after-free.patch
diff options
context:
space:
mode:
authorHans-Christian Noren Egtvedt <hegtvedt@cisco.com>2022-02-02 18:14:39 (GMT)
committerChris Packham <judge.packham@gmail.com>2022-02-03 20:55:25 (GMT)
commit5a4c95d658eddaf7e7cd3b4c2951875a8e427e2e (patch)
tree5556b6fdab05cb41960bf40da5d20e3e128c6e46 /packages/binutils/2.37/0014-pr28422-build_id-use-after-free.patch
parent392955a293573451baf3a9294139d0558b08ca2e (diff)
binutils-2.37: add more patches from upstream release branch
Fetch in various patches from binutils-2_37-branch upstream. The most vital change is the 0012-pr28391-strip-objcopy-preserve-dates-a-cannot-set-time.patch which allows building large upstream projects like Qt WebEngine without need 100k's of file descriptors open. Signed-off-by: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
Diffstat (limited to 'packages/binutils/2.37/0014-pr28422-build_id-use-after-free.patch')
-rw-r--r--packages/binutils/2.37/0014-pr28422-build_id-use-after-free.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/binutils/2.37/0014-pr28422-build_id-use-after-free.patch b/packages/binutils/2.37/0014-pr28422-build_id-use-after-free.patch
new file mode 100644
index 0000000..5f6c81a
--- /dev/null
+++ b/packages/binutils/2.37/0014-pr28422-build_id-use-after-free.patch
@@ -0,0 +1,31 @@
+From c20c7adbeaa3af18a58ba1e20e6c33e7186356e3 Mon Sep 17 00:00:00 2001
+From: Alan Modra <amodra@gmail.com>
+Date: Wed, 6 Oct 2021 18:28:47 +1030
+Subject: [PATCH] PR28422, build_id use-after-free
+
+This fixes a bug in commit 5d9bbb73c1df. All fields preserved from a
+bfd in struct bfd_preserve need to be cleared in bfd_reinit.
+
+ PR 28422
+ * format.c (bfd_reinit): Clear build_id.
+
+(cherry picked from commit 6d661cdc5be46e890ed9255e749806f46a88e26c)
+---
+ bfd/format.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/bfd/format.c b/bfd/format.c
+index 5d08d1d642c..408c984690e 100644
+--- a/bfd/format.c
++++ b/bfd/format.c
+@@ -151,6 +151,7 @@ bfd_reinit (bfd *abfd, unsigned int section_id, bfd_cleanup cleanup)
+ abfd->tdata.any = NULL;
+ abfd->arch_info = &bfd_default_arch_struct;
+ abfd->flags &= BFD_FLAGS_SAVED;
++ abfd->build_id = NULL;
+ bfd_section_list_clear (abfd);
+ }
+
+--
+2.27.0
+