2012-01-06 Tristan Gingold <gingold@adacore.com>

* bfdio.c (bfd_bread): Use arelt_size macro.
This commit is contained in:
Tristan Gingold 2012-01-06 11:43:51 +00:00
parent 76d4c1cb5c
commit 36f0a48f6c
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2012-01-06 Tristan Gingold <gingold@adacore.com>
* bfdio.c (bfd_bread): Use arelt_size macro.
2012-01-06 Tristan Gingold <gingold@adacore.com>
* config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.

View File

@ -185,7 +185,7 @@ bfd_bread (void *ptr, bfd_size_type size, bfd *abfd)
this element. */
if (abfd->arelt_data != NULL)
{
size_t maxbytes = ((struct areltdata *) abfd->arelt_data)->parsed_size;
size_t maxbytes = arelt_size (abfd);
if (abfd->where + size > maxbytes)
{
if (abfd->where >= maxbytes)