openbsd-ports/graphics/imlib2/patches/patch-src_rgba_c
brad e264d12b1e upgrade to imlib2 1.1.2
Marcus Meissner discovered that imlib's BMP decoder would crash
when loading the test BMP file created by Chris Evans for testing
a previous Qt vulnerability. It is believed that this bug could
be exploited for arbitrary code execution.

also some port fixes, added missing dependencies, etc.
2004-09-21 22:40:36 +00:00

328 lines
10 KiB
Plaintext

$OpenBSD: patch-src_rgba_c,v 1.2 2004/09/21 22:40:36 brad Exp $
--- src/rgba.c.orig Sat Jul 12 21:09:17 2003
+++ src/rgba.c Tue Aug 24 20:42:32 2004
@@ -2856,7 +2856,7 @@ __imlib_RGBA_to_RGB565_fast(DATA32 * src
w = width;
h = height;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_2(width))
{
@@ -2926,7 +2926,7 @@ __imlib_RGBA_to_RGB565_dither(DATA32 * s
w = width + dx;
h = height + dy;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_2(width))
{
@@ -2998,7 +2998,7 @@ __imlib_RGBA_to_BGR565_fast(DATA32 * src
w = width;
h = height;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_2(width))
{
@@ -3068,7 +3068,7 @@ __imlib_RGBA_to_BGR565_dither(DATA32 * s
w = width + dx;
h = height + dy;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_2(width))
{
@@ -3140,7 +3140,7 @@ __imlib_RGBA_to_RGB555_fast(DATA32 * src
w = width;
h = height;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_2(width))
{
@@ -3210,7 +3210,7 @@ __imlib_RGBA_to_RGB555_dither(DATA32 * s
w = width + dx;
h = height + dy;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_2(width))
{
@@ -3282,7 +3282,7 @@ __imlib_RGBA_to_BGR555_fast(DATA32 * src
w = width;
h = height;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_2(width))
{
@@ -3352,7 +3352,7 @@ __imlib_RGBA_to_BGR555_dither(DATA32 * s
w = width + dx;
h = height + dy;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_2(width))
{
@@ -3423,7 +3423,7 @@ __imlib_RGBA_to_RGB332_fast(DATA32 * src
w = width;
h = height;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -3467,7 +3467,7 @@ __imlib_RGBA_to_RGB332_fast(DATA32 * src
{
for (y = 0; y < h; y++)
{
- for (x = 0; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = 0; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB332(src, dest);
}
@@ -3520,7 +3520,7 @@ __imlib_RGBA_to_RGB332_dither(DATA32 * s
w = width + dx;
h = height + dy;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -3565,7 +3565,7 @@ __imlib_RGBA_to_RGB332_dither(DATA32 * s
for (y = dy; y < h; y++)
{
w = width + dx;
- for (x = dx; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = dx; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB332_DITHER(src, dest);
}
@@ -3599,7 +3599,7 @@ __imlib_RGBA_to_RGB666_fast(DATA32 * src
w = width;
h = height;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -3643,7 +3643,7 @@ __imlib_RGBA_to_RGB666_fast(DATA32 * src
{
for (y = 0; y < h; y++)
{
- for (x = 0; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = 0; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB666(src, dest);
}
@@ -3696,7 +3696,7 @@ __imlib_RGBA_to_RGB666_dither(DATA32 * s
w = width + dx;
h = height + dy;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -3741,7 +3741,7 @@ __imlib_RGBA_to_RGB666_dither(DATA32 * s
for (y = dy; y < h; y++)
{
w = width + dx;
- for (x = dx; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = dx; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB666_DITHER(src, dest);
}
@@ -3775,7 +3775,7 @@ __imlib_RGBA_to_RGB232_fast(DATA32 * src
w = width;
h = height;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -3819,7 +3819,7 @@ __imlib_RGBA_to_RGB232_fast(DATA32 * src
{
for (y = 0; y < h; y++)
{
- for (x = 0; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = 0; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB232(src, dest);
}
@@ -3872,7 +3872,7 @@ __imlib_RGBA_to_RGB232_dither(DATA32 * s
w = width + dx;
h = height + dy;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -3917,7 +3917,7 @@ __imlib_RGBA_to_RGB232_dither(DATA32 * s
for (y = dy; y < h; y++)
{
w = width + dx;
- for (x = dx; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = dx; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB232_DITHER(src, dest);
}
@@ -3951,7 +3951,7 @@ __imlib_RGBA_to_RGB222_fast(DATA32 * src
w = width;
h = height;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -3995,7 +3995,7 @@ __imlib_RGBA_to_RGB222_fast(DATA32 * src
{
for (y = 0; y < h; y++)
{
- for (x = 0; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = 0; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB222(src, dest);
}
@@ -4048,7 +4048,7 @@ __imlib_RGBA_to_RGB222_dither(DATA32 * s
w = width + dx;
h = height + dy;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -4093,7 +4093,7 @@ __imlib_RGBA_to_RGB222_dither(DATA32 * s
for (y = dy; y < h; y++)
{
w = width + dx;
- for (x = dx; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = dx; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB222_DITHER(src, dest);
}
@@ -4127,7 +4127,7 @@ __imlib_RGBA_to_RGB221_fast(DATA32 * src
w = width;
h = height;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -4171,7 +4171,7 @@ __imlib_RGBA_to_RGB221_fast(DATA32 * src
{
for (y = 0; y < h; y++)
{
- for (x = 0; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = 0; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB221(src, dest);
}
@@ -4224,7 +4224,7 @@ __imlib_RGBA_to_RGB221_dither(DATA32 * s
w = width + dx;
h = height + dy;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -4269,7 +4269,7 @@ __imlib_RGBA_to_RGB221_dither(DATA32 * s
for (y = dy; y < h; y++)
{
w = width + dx;
- for (x = dx; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = dx; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB221_DITHER(src, dest);
}
@@ -4303,7 +4303,7 @@ __imlib_RGBA_to_RGB121_fast(DATA32 * src
w = width;
h = height;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -4347,7 +4347,7 @@ __imlib_RGBA_to_RGB121_fast(DATA32 * src
{
for (y = 0; y < h; y++)
{
- for (x = 0; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = 0; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB121(src, dest);
}
@@ -4400,7 +4400,7 @@ __imlib_RGBA_to_RGB121_dither(DATA32 * s
w = width + dx;
h = height + dy;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -4445,7 +4445,7 @@ __imlib_RGBA_to_RGB121_dither(DATA32 * s
for (y = dy; y < h; y++)
{
w = width + dx;
- for (x = dx; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = dx; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB121_DITHER(src, dest);
}
@@ -4479,7 +4479,7 @@ __imlib_RGBA_to_RGB111_fast(DATA32 * src
w = width;
h = height;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -4523,7 +4523,7 @@ __imlib_RGBA_to_RGB111_fast(DATA32 * src
{
for (y = 0; y < h; y++)
{
- for (x = 0; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = 0; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB111(src, dest);
}
@@ -4576,7 +4576,7 @@ __imlib_RGBA_to_RGB111_dither(DATA32 * s
w = width + dx;
h = height + dy;
- if (IS_ALIGNED_32((int)dest))
+ if (IS_ALIGNED_32((long)dest))
{
if (IS_MULTIPLE_4(width))
{
@@ -4621,7 +4621,7 @@ __imlib_RGBA_to_RGB111_dither(DATA32 * s
for (y = dy; y < h; y++)
{
w = width + dx;
- for (x = dx; ((x < w) && (!(IS_ALIGNED_32((int)dest)))); x++)
+ for (x = dx; ((x < w) && (!(IS_ALIGNED_32((long)dest)))); x++)
{
WRITE1_RGBA_RGB111_DITHER(src, dest);
}