blob: ec8cde250394c18898911cd6af5647fd0cf5555f [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001From 9f841c583880eb6d0194455c1583a766f853e628 Mon Sep 17 00:00:00 2001
2From: Alan Modra <amodra@gmail.com>
3Date: Wed, 20 Feb 2019 12:06:31 +1030
4Subject: [PATCH] PR24233, Out of memory
5
6 PR 24233
7 * objdump.c (dump_bfd_private_header): Print warning if
8 bfd_print_private_bfd_data returns false.
9
10Upstream-Status: Backport [https://github.com/bminor/binutils-gdb/commit/7d272a55caebfc26ab2e15d1e9439bac978b9bb7]
11CVE: CVE-2019-9076
12Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
13---
14 binutils/ChangeLog | 6 ++++++
15 binutils/objdump.c | 4 +++-
16 2 files changed, 9 insertions(+), 1 deletion(-)
17
18diff --git a/binutils/ChangeLog b/binutils/ChangeLog
19index f837c37..d5dd7cb 100644
20--- a/binutils/ChangeLog
21+++ b/binutils/ChangeLog
22@@ -1,3 +1,9 @@
23+2019-02-20 Alan Modra <amodra@gmail.com>
24+
25+ PR 24233
26+ * objdump.c (dump_bfd_private_header): Print warning if
27+ bfd_print_private_bfd_data returns false.
28+
29 2019-02-02 Nick Clifton <nickc@redhat.com>
30
31 * configure: Regenerate.
32diff --git a/binutils/objdump.c b/binutils/objdump.c
33index 8725390..7d0c6a4 100644
34--- a/binutils/objdump.c
35+++ b/binutils/objdump.c
36@@ -3178,7 +3178,9 @@ dump_bfd_header (bfd *abfd)
37 static void
38 dump_bfd_private_header (bfd *abfd)
39 {
40- bfd_print_private_bfd_data (abfd, stdout);
41+ if (!bfd_print_private_bfd_data (abfd, stdout))
42+ non_fatal (_("warning: private headers incomplete: %s"),
43+ bfd_errmsg (bfd_get_error ()));
44 }
45
46 static void
47--
482.7.4
49