memcpy

Conor P. Cahill cpcahil at virtech.uucp
Fri Sep 21 11:52:04 AEST 1990


In article <1990Sep19.021418.11574 at maths.tcd.ie> tim at maths.tcd.ie (Timothy Murphy) writes:
>In unzip.c it is assumed that the effect of
>	buf[0] = c;
>	memcpy(buf+1, buf, 20);
>is to set
>	buf[0] = buf[1] = buf[2] = ... = buf[21] = c.

The effect of memcpy on overlapping memory areas is undefined.  unzip.c 
should not depend upon any particular behavior.

>Is this a bug on the Sparc,

No.  it is a bug in unzip.

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 



More information about the Comp.std.c mailing list