Bug 1279972 - ssse3-scaler: initialize iter.data to NULL. a=lizzard
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Wed, 22 Jun 2016 20:52:31 -0400
changeset 339731 f42e0b7e135a24347c414285ae531c879ee338d4
parent 339730 e9b9db70e4d6d47b9f53f1f5fc65cf096ad9e39e
child 339732 8f2d601499b58989abbce9d73e5acd508379fd03
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslizzard
bugs1279972
milestone49.0a2
Bug 1279972 - ssse3-scaler: initialize iter.data to NULL. a=lizzard This should avoid calling free with an uninitialized value.
gfx/2d/ssse3-scaler.c
--- a/gfx/2d/ssse3-scaler.c
+++ b/gfx/2d/ssse3-scaler.c
@@ -543,16 +543,17 @@ void ssse3_scale_data(uint32_t *src, int
 
     pixman_iter_t iter;
     iter.image = &image;
     iter.x = x;
     iter.y = y;
     iter.width = width;
     iter.height = src_height;
     iter.buffer = dest;
+    iter.data = NULL;
 
     ssse3_bilinear_cover_iter_init(&iter);
     for (int iy = 0; iy < height; iy++) {
         ssse3_fetch_bilinear_cover(&iter, NULL);
         iter.buffer += dest_stride;
     }
     ssse3_bilinear_cover_iter_fini(&iter);