$OpenBSD: patch-bfd_peXXigen_c,v 1.4 2015/03/15 02:58:07 pascal Exp $
Fix out-of-bounds memcpys (FILNMLEN is 18, sizeof x_fname is 14).
--- bfd/peXXigen.c.orig	Fri Feb 20 18:11:44 2015
+++ bfd/peXXigen.c	Fri Feb 20 22:12:26 2015
@@ -307,7 +307,7 @@ _bfd_XXi_swap_aux_in (bfd *	abfd,
 	  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:
@@ -381,7 +381,7 @@ _bfd_XXi_swap_aux_out (bfd *  abfd,
 	  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;
 
