diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-03-15 21:25:58 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-03-15 21:47:28 +0100 |
commit | 36864e9160d078a0f4b21033c35abdaea073e360 (patch) | |
tree | 38f3bec33adffcffe999e1554324705472c346e8 | |
parent | 2c0273de141277e954faf33edf4543afb31dc4d8 (diff) |
Use FAST_PATH_16BIT_SAFE flag in normal repeat nearest scaleralex-scaler
This is needed to avoid overflows in the nearest repeat handler,
for instance:
max_vx = src_image->bits.width << 16;
max_vy = src_image->bits.height << 16;
These could overflow if the src image is > 16bit.
And:
y = vy >> 16;
vy += unit_y;
if (do_repeat)
{
if (unit_y >= 0)
while (vy >= max_vy) vy -= max_vy;
If vy += unit_y overflows the while check can fail.ove 16bit flag
-rw-r--r-- | pixman/pixman-fast-path.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c index 7832fb2a..763f51f5 100644 --- a/pixman/pixman-fast-path.c +++ b/pixman/pixman-fast-path.c @@ -1822,7 +1822,7 @@ static const pixman_fast_path_t c_fast_paths[] = #define SIMPLE_NEAREST_FAST_PATH(op,s,d,func) \ { PIXMAN_OP_ ## op, \ PIXMAN_ ## s, \ - SCALED_NEAREST_FLAGS | HAS_NORMAL_REPEAT_FLAGS, \ + SCALED_NEAREST_FLAGS | HAS_NORMAL_REPEAT_FLAGS | FAST_PATH_16BIT_SAFE, \ PIXMAN_null, 0, \ PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \ fast_composite_scaled_nearest_ ## func ## _ ## op ## _normal, \ |