[32] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Re: bcopy vs. memcpy

daemon@ATHENA.MIT.EDU (Bill Sommerfeld)
Thu Oct 18 17:34:50 1990

Date: Thu, 18 Oct 90 17:00:38 EDT
From: Bill Sommerfeld <sommerfeld@apollo.com>
To: bstrand@poplar.cray.com
Cc: krb5-testers@ATHENA.MIT.EDU
In-Reply-To: Brad Strand's message of Thursday, October 18, 1990   4:18:26 pm (EDT)

   Date: Thursday, October 18, 1990   4:18:26 pm (EDT)
   From: bstrand@poplar.cray.com (Brad Strand)
   Organization:  Cray Research, Inc., Eagan, MN

   Maybe I'm in the minority, but I prefer the BSD stuff simply because
   they check for and properly handle overlapping input/output
   buffer conditions.  (Not that I encourage this practice  ;-)

That's what "memmove()" is for; it's _specified_ to do the right thing
when the input and output strings overlap.  (Overlap is not an issue
for the other mem* functions).  Bcopy is not specified to behave as
you state; the man page is silent on the issue, though most
implementations "do the right thing".

					- Bill


home help back first fref pref prev next nref lref last post