From 946b5344193183133bfc9799e26d3d0436d86404 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 28 Oct 2018 14:52:25 -0700 Subject: [PATCH] [sbix] Fix uninitialized variables --- src/hb-ot-color-sbix-table.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh index ce46f3fe8..5cff5b976 100644 --- a/src/hb-ot-color-sbix-table.hh +++ b/src/hb-ot-color-sbix-table.hh @@ -246,15 +246,16 @@ struct sbix if (likely (sbix_len == 0)) return false; - int x_offset, y_offset; + int x_offset = 0, y_offset = 0; hb_blob_t *blob = reference_blob_for_glyph (font, glyph, HB_TAG ('p','n','g',' '), &x_offset, &y_offset); - const PNGHeader &png = *blob->as(); if (unlikely (blob->length < sizeof (PNGHeader))) return false; + const PNGHeader &png = *blob->as(); + extents->x_bearing = x_offset; extents->y_bearing = y_offset; extents->width = png.IHDR.width;