From f3981a8bcd97a0388bf150ea7c1b4a1015e5e358 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 19 Jul 2018 16:44:03 +0900 Subject: [PATCH] Fix access in a null pointer dereference --- src/fccfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fccfg.c b/src/fccfg.c index b61848a..31ed238 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -748,12 +748,12 @@ FcConfigPromote (FcValue v, FcValue u, FcValuePromotionBuffer *buf) v.u.l = FcLangSetPromote (v.u.s, buf); v.type = FcTypeLangSet; } - else if (v.type == FcTypeVoid && u.type == FcTypeLangSet) + else if (buf && v.type == FcTypeVoid && u.type == FcTypeLangSet) { v.u.l = FcLangSetPromote (NULL, buf); v.type = FcTypeLangSet; } - else if (v.type == FcTypeVoid && u.type == FcTypeCharSet) + else if (buf && v.type == FcTypeVoid && u.type == FcTypeCharSet) { v.u.c = FcCharSetPromote (buf); v.type = FcTypeCharSet;