aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/bfdio.c')
-rw-r--r--bfd/bfdio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/bfdio.c b/bfd/bfdio.c
index c142c17..6f8a7c9 100644
--- a/bfd/bfdio.c
+++ b/bfd/bfdio.c
@@ -185,7 +185,8 @@ bfd_bread (void *ptr, bfd_size_type size, bfd *abfd)
this element. */
if (abfd->arelt_data != NULL)
{
- size_t maxbytes = arelt_size (abfd);
+ bfd_size_type maxbytes = arelt_size (abfd);
+
if (abfd->where + size > maxbytes)
{
if (abfd->where >= maxbytes)