xserver: Branch 'server-1.7-branch'

Julien Cristau jcristau at kemper.freedesktop.org
Fri Dec 3 02:32:39 PST 2010


 render/render.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 472163b7f3a5e7aa7f40fa81b1facc71dd3529bc
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Tue Nov 2 20:10:32 2010 +0100

    render: Fix byteswapping of gradient stops
    
    The function swapStops repeatedly swaps the color components as
    CARD16, but incorrectly steps over them as if they were CARD32.
    
    This causes half of the stops not to be swapped at all and some
    unrelated data be swapped instead.
    
    Signed-off-by: Andrea Canciani <ranma42 at gmail.com>
    Reviewed-by: Soren Sandmann <sandmann at daimi.au.dk>
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit dab064fa5e0b1f5c67222562ad5367005832cba1)

diff --git a/render/render.c b/render/render.c
index b78c75b..405f7db 100644
--- a/render/render.c
+++ b/render/render.c
@@ -2565,8 +2565,8 @@ static void swapStops(void *stuff, int num)
     }
     colors = (CARD16 *)(stops);
     for (i = 0; i < 4*num; ++i) {
-        swaps(stops, n);
-        ++stops;
+        swaps(colors, n);
+        ++colors;
     }
 }
 


More information about the xorg-commit mailing list