From ea4ebd59377d3dff3616bd20381f308a92781ae6 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 1 Mar 2013 19:38:21 +0900 Subject: [PATCH] Fix a crash when the object is non-builtin object --- src/fcmatch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fcmatch.c b/src/fcmatch.c index fa8800a..09c1b6a 100644 --- a/src/fcmatch.c +++ b/src/fcmatch.c @@ -269,7 +269,8 @@ FcObjectToMatcher (FcObject object, break; } } - if (!_FcMatchers[object].compare || + if (object > FC_MAX_BASE_OBJECT || + !_FcMatchers[object].compare || _FcMatchers[object].strong == -1 || _FcMatchers[object].weak == -1) return NULL;