summaryrefslogtreecommitdiff
path: root/packages/binutils/2.37/0013-pr28422-build_id-use-after-free.patch
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2022-02-11 02:00:59 (GMT)
committerAlexey Neyman <stilor@att.net>2022-02-11 08:47:51 (GMT)
commit86c2982568de1ad4d4cc12a65b19231331484405 (patch)
tree2e0b3fb78c30877c0c152d59d0e0fff817b73822 /packages/binutils/2.37/0013-pr28422-build_id-use-after-free.patch
parent1210b0c2f45e32ef0867ca00e16b6aadb6a81bf9 (diff)
Run patches thru `manage-packages -P`
This refreshes the line numbers, removes any fuzz (which would make any future forward ports easier) and standardizes the patch/file headers (which makes them easier to read). Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'packages/binutils/2.37/0013-pr28422-build_id-use-after-free.patch')
-rw-r--r--packages/binutils/2.37/0013-pr28422-build_id-use-after-free.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/packages/binutils/2.37/0013-pr28422-build_id-use-after-free.patch b/packages/binutils/2.37/0013-pr28422-build_id-use-after-free.patch
new file mode 100644
index 0000000..97308ca
--- /dev/null
+++ b/packages/binutils/2.37/0013-pr28422-build_id-use-after-free.patch
@@ -0,0 +1,26 @@
+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(+)
+
+--- a/bfd/format.c
++++ b/bfd/format.c
+@@ -151,6 +151,7 @@
+ 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);
+ }
+