From: Ray Lehtiniemi Date: Wed, 8 Apr 2009 04:14:20 +0000 (-0600) Subject: Fix a 64-bit segfault in kdenlive X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=f13ee0890b643f2c2eb220290f8374c80605a505;p=melted Fix a 64-bit segfault in kdenlive To reproduce: - create a new project - create a color clip - add clip to timeline - set an in point on the clip - add the box blur effect The segfault happens because we take the negative of an unsigned integer. This works out to a signed 32 bit value on a 64 bit platform, which causes the rgb array bounds to be exceeded. Signed-off-by: Ray Lehtiniemi --- diff --git a/src/modules/kdenlive/filter_boxblur.c b/src/modules/kdenlive/filter_boxblur.c index f2316d0..f1d5425 100644 --- a/src/modules/kdenlive/filter_boxblur.c +++ b/src/modules/kdenlive/filter_boxblur.c @@ -26,7 +26,7 @@ #include -static void PreCompute(uint8_t *yuv, int32_t *rgb, unsigned int width, unsigned int height) +static void PreCompute(uint8_t *yuv, int32_t *rgb, int width, int height) { register int x, y, z; register int uneven = width % 2;