[pango/issue-489] Initialise out arguments
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/issue-489] Initialise out arguments
- Date: Fri, 3 Jul 2020 10:52:30 +0000 (UTC)
commit 8ed55ed79ee1319b846f6d6954906a6ec6e19869
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Jul 3 11:49:08 2020 +0100
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
pango/pangofc-fontmap.c | 6 ++++++
1 file changed, 6 insertions(+)
---
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]