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

Bug#159633: strncpy on alpha/libc broken



On Mon, Sep 09, 2002 at 12:04:14AM -0400, Daniel Jacobowitz wrote:
> On Mon, Sep 09, 2002 at 12:36:51PM +1000, Herbert Xu wrote:
>
> > I was referring to that patch in the previous message.  In the misaligned
> > case, the code will always do two 8-byte loads if the dest misalignment
> > is greater than the src misalignment even with your patch applied.
> > This will segfault when count == 1 and src is on a page boundary.
> > 
> > Another check needs to be added before the first branch to $u_head
> > to fix this.
> 
> It will do two loads if the dest alignment is greater than the source
> misalignment - but they turn out to be the _same_ memory location.

You're right, that case is not a problem.
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



Reply to: