[Swfdec-commits] swfdec/swfdec_color_matrix_filter.c

Benjamin Otte company at kemper.freedesktop.org
Wed Oct 8 12:36:40 PDT 2008


 swfdec/swfdec_color_matrix_filter.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 50b1a1ba4ca333a3f0efa806c0f7385cbb391edb
Author: Benjamin Otte <otte at gnome.org>
Date:   Wed Oct 8 21:27:53 2008 +0200

    use width, not height
    
    this caused random memory reads/writes and in turn, crashes

diff --git a/swfdec/swfdec_color_matrix_filter.c b/swfdec/swfdec_color_matrix_filter.c
index 092a887..63d250f 100644
--- a/swfdec/swfdec_color_matrix_filter.c
+++ b/swfdec/swfdec_color_matrix_filter.c
@@ -71,7 +71,7 @@ swfdec_color_matrix_filter_apply (SwfdecFilter *filter, cairo_pattern_t *pattern
   data = cairo_image_surface_get_data (surface);
   stride = cairo_image_surface_get_stride (surface);
   for (y = 0; y < rect->height; y++) {
-    for (x = 0; x < rect->height; x++) {
+    for (x = 0; x < rect->width; x++) {
       a = data[x * 4 + SWFDEC_COLOR_INDEX_ALPHA];
       r = data[x * 4 + SWFDEC_COLOR_INDEX_RED];
       g = data[x * 4 + SWFDEC_COLOR_INDEX_GREEN];


More information about the Swfdec-commits mailing list