Code

store_lookup: Catch invalid values when parsing a matcher.
[sysdb.git] / src / core / store_lookup.c
index 0bb157c76e7a49162e3832f5b9ae0e013372485a..8aa8ab085e4dd1fc40eb2586e95ea62cb506ba2c 100644 (file)
@@ -818,6 +818,9 @@ sdb_store_matcher_parse_cmp(const char *obj_type, const char *attr,
        else
                return NULL;
 
+       if (! value)
+               return NULL;
+
        if (value->type != SDB_TYPE_STRING) {
                if (type == SDB_ATTRIBUTE)
                        return parse_attr_cmp(attr, op, value);