diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-03-18 23:25:19 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-03-18 23:43:42 -0400 |
commit | 4c02b0ad0a9d8f5fc3b09ae7ae45abf142f99d23 (patch) | |
tree | ce7256f0120ce6110d20c96f2f7db610f162861d /pango/glyphstring.c | |
parent | 69a7dde587b14038cb6009608ed03618f0b3cbfd (diff) | |
download | pango-4c02b0ad0a9d8f5fc3b09ae7ae45abf142f99d23.tar.gz |
Use g_memdup2()memdup2
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
Diffstat (limited to 'pango/glyphstring.c')
-rw-r--r-- | pango/glyphstring.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pango/glyphstring.c b/pango/glyphstring.c index 649e7758..6c2338f1 100644 --- a/pango/glyphstring.c +++ b/pango/glyphstring.c @@ -112,15 +112,15 @@ pango_glyph_string_copy (PangoGlyphString *string) if (string == NULL) return NULL; - + new_string = g_slice_new (PangoGlyphString); *new_string = *string; - new_string->glyphs = g_memdup (string->glyphs, - string->space * sizeof (PangoGlyphInfo)); - new_string->log_clusters = g_memdup (string->log_clusters, - string->space * sizeof (gint)); + new_string->glyphs = g_memdup2 (string->glyphs, + string->space * sizeof (PangoGlyphInfo)); + new_string->log_clusters = g_memdup2 (string->log_clusters, + string->space * sizeof (gint)); return new_string; } |