summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-05-13 18:46:13 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-05-13 18:46:13 +0000
commit009421e841fe06cb88936eb9a8c62346c97bd137 (patch)
treeb7728afa977ac95954702678da4a6b7ff5a11f18
parentf0f38b3ab2fd9e9a8debe35db71156afc01b5d8c (diff)
downloadpango-009421e841fe06cb88936eb9a8c62346c97bd137.tar.gz
Fix possible NULL dereference. (Coverity found)
2006-05-13 Behdad Esfahbod <behdad@gnome.org> * pango/fonts.c (pango_font_face_list_sizes): Fix possible NULL dereference. (Coverity found)
-rw-r--r--ChangeLog5
-rw-r--r--pango/fonts.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d3b76a5..56937344 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-13 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/fonts.c (pango_font_face_list_sizes): Fix possible NULL
+ dereference. (Coverity found)
+
2006-05-11 Behdad Esfahbod <behdad@gnome.org>
* pango/fonts.c (pango_font_description_set_size): Update docs to note
diff --git a/pango/fonts.c b/pango/fonts.c
index df7b0c94..0e5de467 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -1666,7 +1666,8 @@ pango_font_face_list_sizes (PangoFontFace *face,
PANGO_FONT_FACE_GET_CLASS (face)->list_sizes (face, sizes, n_sizes);
else
{
- *sizes = NULL;
+ if (sizes != NULL)
+ *sizes = NULL;
*n_sizes = 0;
}
}