diff options
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/0078-PR-binutils-13622.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/0078-PR-binutils-13622.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/0078-PR-binutils-13622.patch b/meta/recipes-devtools/binutils/binutils/0078-PR-binutils-13622.patch new file mode 100644 index 0000000000..a28fc9d8e9 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0078-PR-binutils-13622.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | From dcf0cb6bb406708020efe2db44f53af0fe822773 Mon Sep 17 00:00:00 2001 | ||
4 | From: Nick Clifton <nickc@redhat.com> | ||
5 | Date: Mon, 30 Jan 2012 11:35:37 +0000 | ||
6 | Subject: [PATCH 078/262] PR binutils/13622 * readelf.c | ||
7 | (process_section_groups): If there are no section | ||
8 | headers do not scan for section groups. | ||
9 | (process_note_sections): Likewise for note | ||
10 | sections. | ||
11 | |||
12 | --- | ||
13 | binutils/ChangeLog | 7 +++++++ | ||
14 | binutils/readelf.c | 5 +++-- | ||
15 | 2 files changed, 10 insertions(+), 2 deletions(-) | ||
16 | |||
17 | 2012-01-26 Nick Clifton <nickc@redhat.com> | ||
18 | |||
19 | PR binutils/13622 | ||
20 | * readelf.c (process_section_groups): If there are no section | ||
21 | headers do not scan for section groups. | ||
22 | (process_note_sections): Likewise for note sections. | ||
23 | diff --git a/binutils/readelf.c b/binutils/readelf.c | ||
24 | index 9e13190..bf053d9 100644 | ||
25 | --- a/binutils/readelf.c | ||
26 | +++ b/binutils/readelf.c | ||
27 | @@ -4937,7 +4937,8 @@ process_section_groups (FILE * file) | ||
28 | if (section_headers == NULL) | ||
29 | { | ||
30 | error (_("Section headers are not available!\n")); | ||
31 | - abort (); | ||
32 | + /* PR 13622: This can happen with a corrupt ELF header. */ | ||
33 | + return 0; | ||
34 | } | ||
35 | |||
36 | section_headers_groups = (struct group **) calloc (elf_header.e_shnum, | ||
37 | @@ -12942,7 +12943,7 @@ process_note_sections (FILE * file) | ||
38 | int res = 1; | ||
39 | |||
40 | for (i = 0, section = section_headers; | ||
41 | - i < elf_header.e_shnum; | ||
42 | + i < elf_header.e_shnum && section != NULL; | ||
43 | i++, section++) | ||
44 | if (section->sh_type == SHT_NOTE) | ||
45 | res &= process_corefile_note_segment (file, | ||
46 | -- | ||
47 | 1.7.9.5 | ||
48 | |||