summaryrefslogtreecommitdiff
path: root/pango/pangofc-fontmap.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-07-03 11:49:08 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2020-07-03 11:49:08 +0100
commit8ed55ed79ee1319b846f6d6954906a6ec6e19869 (patch)
treea47914d98a54f4ee29feae80056faf6b4a7b93fe /pango/pangofc-fontmap.c
parent4ead5d2a2346c77a3dbc5e8d75221fa28e88f4e5 (diff)
downloadpango-8ed55ed79ee1319b846f6d6954906a6ec6e19869.tar.gz
Initialise out arguments
If we bail out early, we end up with uninitialised data and no way for a caller to know that happened. Fixes: #489
Diffstat (limited to 'pango/pangofc-fontmap.c')
-rw-r--r--pango/pangofc-fontmap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index b2c44300..ec504094 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -2842,6 +2842,12 @@ pango_fc_family_list_faces (PangoFontFamily *family,
{
PangoFcFamily *fcfamily = PANGO_FC_FAMILY (family);
+ if (faces)
+ *faces = NULL;
+
+ if (n_faces)
+ *n_faces = 0;
+
if (G_UNLIKELY (!fcfamily->fontmap))
return;