diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-30 01:34:26 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-31 14:29:56 -0400 |
commit | e382a65301847bb432c1bf3f9774ef48e1ec4734 (patch) | |
tree | c22dca17534244c198e1ae012e4362dfc2c48cf4 | |
parent | 2555d464361e96542ec9d9b2383e7ec0fe42dad3 (diff) | |
download | pango-e382a65301847bb432c1bf3f9774ef48e1ec4734.tar.gz |
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.
-rw-r--r-- | pango/ellipsize.c | 3 |
1 files changed, 1 insertions, 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) |