pixman: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Dec 15 12:13:53 UTC 2023


 pixman/pixman-fast-path.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 86f9162332db88b65a9094991b3ff0e21400426a
Author: Pavel Labath <pavel at labath.sk>
Date:   Wed Dec 13 08:15:49 2023 +0000

    Fix alignment problem in pixman-fast-path.c
    
    The variable is accessed through uint32_t pointer, so it needs to be
    aligned to avoid undefined behavior (crashes on architectures which
    require aligned accesses).
    
    Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/84

diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c
index 4579fce..e62a8ac 100644
--- a/pixman/pixman-fast-path.c
+++ b/pixman/pixman-fast-path.c
@@ -2848,7 +2848,7 @@ bits_image_fetch_separable_convolution_affine (pixman_image_t * image,
     }
 }
 
-static const uint8_t zero[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+static const uint32_t zero[2] = { 0, 0 };
 
 static force_inline void
 bits_image_fetch_bilinear_affine (pixman_image_t * image,
@@ -2948,7 +2948,7 @@ bits_image_fetch_bilinear_affine (pixman_image_t * image,
 
 	    if (y2 == 0)
 	    {
-		row1 = zero;
+		row1 = (const uint8_t *)zero;
 		mask1 = 0;
 	    }
 	    else
@@ -2961,7 +2961,7 @@ bits_image_fetch_bilinear_affine (pixman_image_t * image,
 
 	    if (y1 == height - 1)
 	    {
-		row2 = zero;
+		row2 = (const uint8_t *)zero;
 		mask2 = 0;
 	    }
 	    else


More information about the xorg-commit mailing list