From 9bd3259335322338e2181935dc031fb9d7805e10 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 2 Feb 2023 13:36:23 -0700 Subject: [PATCH] [cairo] Fix uninitialized value Ouch! --- src/hb-cairo-utils.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-cairo-utils.cc b/src/hb-cairo-utils.cc index 77b3cb0e8..3e5118f21 100644 --- a/src/hb-cairo-utils.cc +++ b/src/hb-cairo-utils.cc @@ -315,9 +315,9 @@ _hb_cairo_paint_linear_gradient (hb_cairo_context_t *c, { cairo_t *cr = c->cr; + unsigned int len = PREALLOCATED_COLOR_STOPS; hb_color_stop_t stops_[PREALLOCATED_COLOR_STOPS]; hb_color_stop_t *stops = stops_; - unsigned int len = PREALLOCATED_COLOR_STOPS; float xx0, yy0, xx1, yy1; float xxx0, yyy0, xxx1, yyy1; float min, max; @@ -363,9 +363,9 @@ _hb_cairo_paint_radial_gradient (hb_cairo_context_t *c, { cairo_t *cr = c->cr; + unsigned int len = PREALLOCATED_COLOR_STOPS; hb_color_stop_t stops_[PREALLOCATED_COLOR_STOPS]; hb_color_stop_t *stops = stops_; - unsigned int len; float min, max; float xx0, yy0, xx1, yy1; float rr0, rr1; @@ -833,7 +833,7 @@ _hb_cairo_paint_sweep_gradient (hb_cairo_context_t *c, { cairo_t *cr = c->cr; - unsigned int len; + unsigned int len = PREALLOCATED_COLOR_STOPS; hb_color_stop_t stops_[PREALLOCATED_COLOR_STOPS]; hb_color_stop_t *stops = stops_; cairo_extend_t extend;