From ad53cbd75fcf6699eafd21a431c07bd338e56313 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 18 Feb 2016 11:42:50 +0000 Subject: [PATCH] Backport fixes from libucl --- contrib/libucl/ucl_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5