summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2006-05-23 07:58:41 +0000
committerTor Lillqvist <tml@src.gnome.org>2006-05-23 07:58:41 +0000
commit8fcd02bf9fc70beb27568325b573a6042d084579 (patch)
tree6c16e1c7c90531e71b0111caa0735ec1b091f4a7
parenta72eb76c6c23b0e0e25400946f101cb6436b9b59 (diff)
downloadpango-8fcd02bf9fc70beb27568325b573a6042d084579.tar.gz
Fix crash, don't dereference NULL.
2006-05-23 Tor Lillqvist <tml@novell.com> * pango/fonts.c (find_field): Fix crash, don't dereference NULL.
-rw-r--r--ChangeLog4
-rw-r--r--pango/fonts.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1cbf165c..81ec2bfd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2006-05-23 Tor Lillqvist <tml@novell.com>
+ * pango/fonts.c (find_field): Fix crash, don't dereference NULL.
+
+2006-05-23 Tor Lillqvist <tml@novell.com>
+
* pango/pangowin32.c (pango_win32_font_describe): Call
pango_font_description_set_absolute_size() instead of
pango_font_description_set_size() as the PangoWin32Font::size is
diff --git a/pango/fonts.c b/pango/fonts.c
index 87c1498c..bd7d0fd3 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -800,7 +800,7 @@ find_field (const FieldMap *map, int n_elements, const char *str, int len, int *
for (i=0; i<n_elements; i++)
{
- if (map[i].str[0] && g_ascii_strncasecmp (map[i].str, str, len) == 0 &&
+ if (map[i].str && map[i].str[0] && g_ascii_strncasecmp (map[i].str, str, len) == 0 &&
map[i].str[len] == '\0')
{
if (val)