This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __mempcpy vs mempcpy


DJ Delorie wrote:
For the libiberty/regex.c bug, please feel free to post a patch for
__mempcpy -> mempcpy.  Consider it pre-approved.

gcc/fixinc/gnu-regex.c suffers from the same problem. Maybe a global search in the whole gcc source is in order?


I can fix it, but I'm going on easter holiday today. If it time critical to fix, maybe someone else should do it instead...

Dj Delorie: How did you intend to fix the bug? By changing this:

    #if defined HAVE_MEMPCPY || defined _LIBC
        *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
    #else
          memcpy (errbuf, msg, errbuf_size - 1);
          errbuf[errbuf_size - 1] = 0;
    #endif

into this?

    memcpy (errbuf, msg, errbuf_size - 1);
    errbuf[errbuf_size - 1] = 0;


Regards, Svein


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]