summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorPascal Stumpf <pascal@cvs.openbsd.org>2012-08-28 18:43:43 +0000
committerPascal Stumpf <pascal@cvs.openbsd.org>2012-08-28 18:43:43 +0000
commitca3f64c0c488a8aed59da1cc7ab59b24dff6f283 (patch)
tree423e8bc2e7b74807dc78d5bf04b0f7c45e8683b1 /gnu/usr.bin
parentacf3d0dabe4a1ffbbed0ee308f78acc40353063c (diff)
Work around -Wbounded warning by using sizeof(x_fname), not FILNMLEN. The
latter gets defined incorrectly (too small) because of include ordering issues. Same fix as for binutils-2.17. Noticed by deraadt@. ok matthew@
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/binutils/bfd/peXXigen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils/bfd/peXXigen.c b/gnu/usr.bin/binutils/bfd/peXXigen.c
index 598aa7cfa03..b75fd9e6dad 100644
--- a/gnu/usr.bin/binutils/bfd/peXXigen.c
+++ b/gnu/usr.bin/binutils/bfd/peXXigen.c
@@ -271,7 +271,8 @@ _bfd_XXi_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
in->x_file.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
}
else
- memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
+ memcpy (in->x_file.x_fname, ext->x_file.x_fname,
+ sizeof(in->x_file.x_fname));
return;
case C_STAT:
@@ -344,7 +345,8 @@ _bfd_XXi_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
H_PUT_32 (abfd, in->x_file.x_n.x_offset, ext->x_file.x_n.x_offset);
}
else
- memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
+ memcpy (ext->x_file.x_fname, in->x_file.x_fname,
+ sizeof(ext->x_file.x_fname));
return AUXESZ;