diff options
author | Akira TAGOH <akira@tagoh.org> | 2018-07-19 16:44:03 +0900 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2018-07-19 16:44:03 +0900 |
commit | f3981a8bcd97a0388bf150ea7c1b4a1015e5e358 (patch) | |
tree | 459858469e46522093225864ab84a9223234d7d9 | |
parent | 586ac3b6c0a324ae8545e2e6437f62e851daa203 (diff) | |
download | fontconfig-f3981a8bcd97a0388bf150ea7c1b4a1015e5e358.tar.gz |
Fix access in a null pointer dereference
-rw-r--r-- | src/fccfg.c | 4 |
1 files 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; |