bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFA] peXXigen.c, _bfd_XXi_swap_aux_in, wrong size used in memcpy.


From: Michael Snyder
Subject: [RFA] peXXigen.c, _bfd_XXi_swap_aux_in, wrong size used in memcpy.
Date: Thu, 03 Mar 2011 10:09:04 -0800
User-agent: Thunderbird 2.0.0.24 (X11/20101201)

OK Nick?

2011-03-03  Michael Snyder  <address@hidden>

        * peXXigen.c (_bfd_XXi_swap_aux_in): Use E_FILNMNEN instead of
        FILENMLEN, otherwise will overwrite array.

Index: peXXigen.c
===================================================================
RCS file: /cvs/src/src/bfd/peXXigen.c,v
retrieving revision 1.69
diff -u -p -u -p -r1.69 peXXigen.c
--- peXXigen.c  21 Dec 2010 15:24:38 -0000      1.69
+++ peXXigen.c  3 Mar 2011 18:03:44 -0000
@@ -249,7 +249,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, E_FILNMLEN);
       return;
 
     case C_STAT:
@@ -323,7 +323,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, E_FILNMLEN);
 
       return AUXESZ;
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]