Warning fix
PR binutils/21665 * libbfd.c (_bfd_generic_get_section_contents): Warning fix. (_bfd_generic_get_section_contents_in_window): Likewise.
This commit is contained in:
parent
79cb3f75de
commit
ea9aafc41a
|
@ -1,3 +1,9 @@
|
||||||
|
2017-06-27 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR binutils/21665
|
||||||
|
* libbfd.c (_bfd_generic_get_section_contents): Warning fix.
|
||||||
|
(_bfd_generic_get_section_contents_in_window): Likewise.
|
||||||
|
|
||||||
2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
|
2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
|
||||||
|
|
||||||
* elfnn-riscv.c (perform_relocation): Support the new
|
* elfnn-riscv.c (perform_relocation): Support the new
|
||||||
|
@ -42,7 +48,7 @@
|
||||||
* compress.c (bfd_get_full_section_contents): Don't check the
|
* compress.c (bfd_get_full_section_contents): Don't check the
|
||||||
file size here.
|
file size here.
|
||||||
* libbfd.c (_bfd_generic_get_section_contents): Check for and
|
* libbfd.c (_bfd_generic_get_section_contents): Check for and
|
||||||
reject a section whoes size + offset is greater than the size
|
reject a section whose size + offset is greater than the size
|
||||||
of the entire file.
|
of the entire file.
|
||||||
(_bfd_generic_get_section_contents_in_window): Likewise.
|
(_bfd_generic_get_section_contents_in_window): Likewise.
|
||||||
|
|
||||||
|
@ -55,10 +61,10 @@
|
||||||
2017-06-26 Nick Clifton <nickc@redhat.com>
|
2017-06-26 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR binutils/21665
|
PR binutils/21665
|
||||||
* opncls.c (get_build_id): Check that the section is beig enough
|
* opncls.c (get_build_id): Check that the section is big enough
|
||||||
to contain the whole note.
|
to contain the whole note.
|
||||||
* compress.c (bfd_get_full_section_contents): Check for and reject
|
* compress.c (bfd_get_full_section_contents): Check for and reject
|
||||||
a section whoes size is greater than the size of the entire file.
|
a section whose size is greater than the size of the entire file.
|
||||||
* elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
|
* elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
|
||||||
contain a notes section.
|
contain a notes section.
|
||||||
|
|
||||||
|
|
|
@ -815,7 +815,7 @@ _bfd_generic_get_section_contents (bfd *abfd,
|
||||||
filesz = bfd_get_file_size (abfd);
|
filesz = bfd_get_file_size (abfd);
|
||||||
if (offset + count < count
|
if (offset + count < count
|
||||||
|| offset + count > sz
|
|| offset + count > sz
|
||||||
|| section->filepos + offset + count > filesz)
|
|| (ufile_ptr) section->filepos + offset + count > filesz)
|
||||||
{
|
{
|
||||||
bfd_set_error (bfd_error_invalid_operation);
|
bfd_set_error (bfd_error_invalid_operation);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -873,7 +873,7 @@ _bfd_generic_get_section_contents_in_window
|
||||||
sz = section->size;
|
sz = section->size;
|
||||||
filesz = bfd_get_file_size (abfd);
|
filesz = bfd_get_file_size (abfd);
|
||||||
if (offset + count > sz
|
if (offset + count > sz
|
||||||
|| section->filepos + offset + count > filesz
|
|| (ufile_ptr) section->filepos + offset + count > filesz
|
||||||
|| ! bfd_get_file_window (abfd, section->filepos + offset, count, w,
|
|| ! bfd_get_file_window (abfd, section->filepos + offset, count, w,
|
||||||
TRUE))
|
TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue