]> source.dussan.org Git - rspamd.git/commitdiff
Backport fixes from libucl
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 18 Feb 2016 11:42:50 +0000 (11:42 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 18 Feb 2016 11:42:50 +0000 (11:42 +0000)
contrib/libucl/ucl_hash.c

index 174ebb6857146c647250d01e0b8923cc4b20d7bc..c54fba7c90a5d0f689da8135ffafb3d3b468acae 100644 (file)
@@ -117,7 +117,7 @@ static inline int
 ucl_hash_equal (const ucl_object_t *k1, const ucl_object_t *k2)
 {
        if (k1->keylen == k2->keylen) {
-               return strncmp (k1->key, k2->key, k1->keylen) == 0;
+               return memcmp (k1->key, k2->key, k1->keylen) == 0;
        }
 
        return 0;
@@ -216,7 +216,7 @@ static inline int
 ucl_hash_caseless_equal (const ucl_object_t *k1, const ucl_object_t *k2)
 {
        if (k1->keylen == k2->keylen) {
-               return strncasecmp (k1->key, k2->key, k1->keylen) == 0;
+               return memcmp (k1->key, k2->key, k1->keylen) == 0;
        }
 
        return 0;