From 80cb19900c3ab36faf92060ea639bccdcda5eaa9 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 12 Aug 2019 18:35:59 +0100 Subject: [Minor] Fix some ubsan related issues --- contrib/libucl/ucl_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib/libucl') diff --git a/contrib/libucl/ucl_hash.c b/contrib/libucl/ucl_hash.c index a8e735d13..dbd19c928 100644 --- a/contrib/libucl/ucl_hash.c +++ b/contrib/libucl/ucl_hash.c @@ -66,7 +66,7 @@ extern const guchar lc_map[256]; static inline uint32_t ucl_hash_func (const ucl_object_t *o) { - return rspamd_cryptobox_fast_hash (o->key, o->keylen, 0xb9a1ef83c4561c95ULL); + return (uint32_t)rspamd_cryptobox_fast_hash (o->key, o->keylen, 0xb9a1ef83c4561c95ULL); } static inline int @@ -124,7 +124,7 @@ ucl_hash_caseless_func (const ucl_object_t *o) break; } - return rspamd_cryptobox_fast_hash_final (&hst); + return (uint32_t)rspamd_cryptobox_fast_hash_final (&hst); } -- cgit v1.2.3