From 36f0a48f6c9a1927618d55b4a7df8ddfbfd0fb9d Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 6 Jan 2012 11:43:51 +0000 Subject: [PATCH] 2012-01-06 Tristan Gingold * bfdio.c (bfd_bread): Use arelt_size macro. --- bfd/ChangeLog | 4 ++++ bfd/bfdio.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3035c2228fb..f9d28f329db 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2012-01-06 Tristan Gingold + + * bfdio.c (bfd_bread): Use arelt_size macro. + 2012-01-06 Tristan Gingold * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs. diff --git a/bfd/bfdio.c b/bfd/bfdio.c index 841c781f4bd..f8c9f3e4c41 100644 --- a/bfd/bfdio.c +++ b/bfd/bfdio.c @@ -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) -- 2.30.2