Ethereal-dev: Re: [ethereal-dev] memcpy problem

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: David Frascone <dave@xxxxxxxxxxxx>
Date: Fri, 28 Jul 2000 15:57:13 -0500
Your buffers are probably overlapping.  Try using bcopy instead.  I know
it handles overlaping buffers properly.

On Fri, Jul 28, 2000 at 04:50:55PM -0400, Jacques Ludman wrote:
> Hi,
> 
> I'm compiling using gcc version 2.95.2.
> 
> I've been getting a bus error when I use memcpy to copy some stuff into
> a structure out of the packet buffer:
> 
> memcpy((void *)&haadr, (void *)dp, sizeof(haadr));
> 
> --sizeof(haadr) = 32
> 
> I was able to remedy the problem by adding -fno-builtin to the CFLAGS in
> the configure file, which causes some extra warnings to be spit out
> during the compilation:
> 
> packet-trmac.c:235: warning: implicit declaration of function `memcpy'
> 
> suggestions?
> 
> thx,
> jj