From: Vsevolod Stakhov Date: Thu, 18 Feb 2016 11:42:50 +0000 (+0000) Subject: Backport fixes from libucl X-Git-Tag: 1.2.0~205 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ad53cbd75fcf6699eafd21a431c07bd338e56313;p=rspamd.git Backport fixes from libucl --- diff --git a/contrib/libucl/ucl_hash.c b/contrib/libucl/ucl_hash.c index 174ebb685..c54fba7c9 100644 --- a/contrib/libucl/ucl_hash.c +++ b/contrib/libucl/ucl_hash.c @@ -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;