Sourceware Bugzilla – Attachment 12265 Details for
Bug 23932
integer overflow causes an endless loop
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
pr23932.patch.2 (text/plain), 1.07 KB, created by
Nick Clifton
on 2020-02-06 17:06:30 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Nick Clifton
Created:
2020-02-06 17:06:30 UTC
Size:
1.07 KB
patch
obsolete
>diff --git a/bfd/elf.c b/bfd/elf.c >index 5e6b9a0f41..0e23222b5e 100644 >--- a/bfd/elf.c >+++ b/bfd/elf.c >@@ -7360,14 +7364,9 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd) > > /* PR 23932. A corrupt input file may contain sections that cannot > be assigned to any segment - because for example they have a >- negative size - or segments that do not contain any sections. */ >- if (map->count == 0) >- { >- sorry: >- bfd_set_error (bfd_error_sorry); >- free (sections); >- return FALSE; >- } >+ negative size - or segments that do not contain any sections. >+ But there are also valid reasons why a segment can be empty. >+ So allow a count of zero. */ > > /* Add the current segment to the list of built segments. */ > *pointer_to_map = map; >@@ -7399,6 +7398,12 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd) > map->includes_filehdr = 0; > map->includes_phdrs = 0; > } >+ >+ continue; >+ sorry: >+ bfd_set_error (bfd_error_sorry); >+ free (sections); >+ return FALSE; > } > while (isec < section_count); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 23932
:
11419
| 12265