Adam Tkac <[email protected]> writes: > Hello, > > attached patch fixes wrong usage of memcpy. See > https://bugs.freedesktop.org/show_bug.cgi?id=36165 for more info. > > Regards, Adam > > From b08e7198dc0141b8074d8fdff681019d86655a38 Mon Sep 17 00:00:00 2001 > From: Adam Tkac <[email protected]> > Date: Tue, 12 Apr 2011 16:49:43 +0200 > Subject: [PATCH] Use memmove instead of memcpy in fbblt.c when memory regions > overlap. > > Signed-off-by: Adam Tkac <[email protected]> > --- > fb/fb.h | 4 ++++ > fb/fbblt.c | 4 ++-- > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/fb/fb.h b/fb/fb.h > index eaa21ad..f68fe3b 100644 > --- a/fb/fb.h > +++ b/fb/fb.h > @@ -66,6 +66,9 @@ > } \ > } while(0) > > +/* XXX: Is this enough? */ > +#define MEMMOVE_WRAPPED MEMCPY_WRAPPED
I don't believe MEMCPY_WRAPPED() is used outside fbblt.c, so we might as well get rid of it and just define MEMMOVE_WRAPPED only. And no, I don't think using the existing MEMCPY_WRAPPED code is enough. It has to select the correct direction for the loop based on the overlap. Soren _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
