forked from Imagelibrary/binutils-gdb
Comment bfd_get_section_limit_octets and bfd_get_section_alloc_size
* bfd.c (bfd_get_section_limit_octets): Add comment. (bfd_get_section_alloc_size): Likewise. * libbfd.c (_bfd_generic_get_section_contents): Use bfd_get_section_limit_octets. * section.c (bfd_get_section_contents): Likewise. * bfd-in2.h: Regenerate.
This commit is contained in:
@@ -1550,10 +1550,7 @@ bfd_get_section_contents (bfd *abfd,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (abfd->direction != write_direction && section->rawsize != 0)
|
||||
sz = section->rawsize;
|
||||
else
|
||||
sz = section->size;
|
||||
sz = bfd_get_section_limit_octets (abfd, section);
|
||||
if ((bfd_size_type) offset > sz
|
||||
|| count > sz - offset
|
||||
|| count != (size_t) count)
|
||||
|
||||
Reference in New Issue
Block a user