[pango/baseline-shift: 1/5] Make ellipsize code safer




commit 35972c94ab50b2556805708d209cc8eee639dc0c
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Aug 30 01:34:26 2021 -0400

    Make ellipsize code safer
    
    We are going to add new fields to PangoGlyphItem,
    so zero-initialize the one we are allocating here
    in ellipsize.c.

 pango/ellipsize.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/pango/ellipsize.c b/pango/ellipsize.c
index e05277f6..d7b7fee0 100644
--- a/pango/ellipsize.c
+++ b/pango/ellipsize.c
@@ -316,9 +316,8 @@ shape_ellipsis (EllipsizeState *state)
    */
   if (!state->ellipsis_run)
     {
-      state->ellipsis_run = g_slice_new (PangoGlyphItem);
+      state->ellipsis_run = g_slice_new0 (PangoGlyphItem);
       state->ellipsis_run->glyphs = pango_glyph_string_new ();
-      state->ellipsis_run->item = NULL;
     }
 
   if (state->ellipsis_run->item)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]