aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src
diff options
context:
space:
mode:
Diffstat (limited to 'fontconfig/src')
-rw-r--r--fontconfig/src/fcname.c2
-rw-r--r--fontconfig/src/fcstr.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/fontconfig/src/fcname.c b/fontconfig/src/fcname.c
index 712b2fad3..f302948dd 100644
--- a/fontconfig/src/fcname.c
+++ b/fontconfig/src/fcname.c
@@ -420,6 +420,8 @@ FcNameParse (const FcChar8 *name)
if ((c = FcNameGetConstant (save)))
{
t = FcNameGetObjectType ((char *) c->object);
+ if (t == NULL)
+ goto bail2;
switch ((int) t->type) {
case FcTypeInteger:
case FcTypeDouble:
diff --git a/fontconfig/src/fcstr.c b/fontconfig/src/fcstr.c
index 570717243..024dae325 100644
--- a/fontconfig/src/fcstr.c
+++ b/fontconfig/src/fcstr.c
@@ -924,12 +924,16 @@ FcStrBuildFilename (const FcChar8 *path,
...)
{
va_list ap;
- FcStrSet *sset = FcStrSetCreate ();
+ FcStrSet *sset;
FcStrList *list;
FcChar8 *s, *ret = NULL, *p;
size_t len = 0;
- if (!sset || !path)
+ if (!path)
+ return NULL;
+
+ sset = FcStrSetCreate ();
+ if (!sset)
return NULL;
if (!FcStrSetAdd (sset, path))